[CentOS] dont run cron.d- when cron.daily-scripts are running
Gordon Messmer
gordon.messmer at gmail.com
Tue Feb 12 16:02:09 UTC 2019
On 2/12/19 4:57 AM, Leon Fauster via CentOS wrote:
> I have some cron.d entries that execute scripts in minute intervals and I'm wondering how could an
> "official" way look like, to have a condition to not run cron.d entries when cron.daily scripts are
> running. Sure, I can hack something around file timestamps or so but that feels not so streamlined ...
run-parts doesn't look like it produces a lock, so I'd venture that the
simplest way would be:
*/5 * * * * root pidof -x run-parts || your-command-here
More information about the CentOS
mailing list