Cron Tips for not running cron jobs on holidays (the monday of a three day weekend)
- by Poul
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!