Cron Tips for not running cron jobs on holidays (the monday of a three day weekend)

Posted by Poul on Super User See other posts from Super User or by Poul
Published on 2011-01-30T14:37:53Z Indexed on 2011/01/30 15:27 UTC
Read the original article Hit count: 505

Filed under:
|

We have about a one hundred machine set-up with each machine running cron jobs like starting and stopping services and archiving these services' log files at the end of the day to a centralized repository.

One headache we have is the three-day weekend (we're closed on holidays). We don't want the services starting up on those days and connecting to our business partner's machines.

We currently do this by manually commenting out the most critical jobs and letting a bunch of errors happen all day. Not ideal.

Basically if a job has '1-5' set in the day field we want this to mean 'work days' and not Monday to Friday'. We have a database that keeps track of which days are indeed 'work days'

So, is it possible to override Cron's day-matching algorithm, or is there some other way to easily set a cron setting to avoid things starting up on a Monday holiday?

Thanks!

© Super User or respective owner

Related posts about linux

Related posts about cron