[wplug] Cron Job - Working hours vs. Off hours
Gentgeen
gentgeen at linuxmail.org
Sun Sep 24 14:57:08 EDT 2006
I want to set up a cron job that will run "foo" every 5 minutes during 7
to 6 on weekdays, but run "foo" every hour the rest of the time. Do I
have this right:
--- BEGIN CRONTAB --------
# Runs every 5 minutes during working hours on weekdays
*/5 7-18 * * 1-5 foo
# Runs every hour during none working hours on weekdays
* 19-6 * * 1-5 foo
# Runs every hour during weekends
* */1 * * 0,6 foo
--- END CRONTAB ----------
Or is there maybe a more eloquent way to do this? (btw this is just a
user crontab, not a system wide cron (crontab -e as user not root)
--
http://gentgeen.homelinux.org
#############################################################
Associate yourself with men of good quality if you esteem
your own reputation; for 'tis better to be alone then in bad
company. - George Washington, Rules of Civility
More information about the wplug
mailing list