0

Currently I'm having two cronjobs as following,

0 */6 * * * root job1

0 */2 * * * root job2

I need to avoid running the job2 when job1 is running. Is there a way to exclude the time (00 00 , 06 00 , etc . . ) from the job2 cron.

Thanks.

Community
  • 1
  • 1
Chamith Malinda
  • 4,399
  • 5
  • 24
  • 28

1 Answers1

1

No, there's no exclusion syntax. Change job2 to:

0 2,4,8,10,14,16,20,22 * * * root job2
Barmar
  • 741,623
  • 53
  • 500
  • 612