Page 1 of 1

crontab possible?

Posted: Tue Jul 06, 2010 7:51 am
by alex.barylski
I have a backup that is a required hourly, however, it does not need to be done after the hours of 5PM until 6AM when everyone starts to get here. Is there a way to do this is CRON or should I just have a conditional check inside my bash script to not bother dumping mysql between those hours?

Re: crontab possible?

Posted: Tue Jul 06, 2010 8:00 am
by VladSun
Yes
man crontab wrote: Ranges of numbers are allowed. Ranges are two numbers separated with a
hyphen. The specified range is inclusive. For example, 8-11 for an
``hours'' entry specifies execution at hours 8, 9, 10 and 11.

Lists are allowed. A list is a set of numbers (or ranges) separated by
commas. Examples: "1,2,5,9", "0-4,8-12"