Re: dont run cron.d- when cron.daily-scripts are running

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux