Web Hosting Talk







View Full Version : CRON when server goes down


chuckt101
11-14-2002, 09:19 AM
Hey, say you have a daily cron job. Say it runs at 2am everyday. If the server is down between 1am and 3am, will the cron run for that day at 3am, or will it wait until 2am the next day?

Thanks

yellow_belly
11-14-2002, 10:18 AM
wait until 2am the next day?

YB

chuckt101
11-15-2002, 11:46 PM
is that a question?

achost_ca
11-16-2002, 12:05 AM
thats the answer. cron doesnt know whether it ran the last time or not, at least to my knowledge. though i would look at it this way: if the server is down for 10 days, do you think that it would be a good idea for cron to run every daily job 10 times over when it comes back up? ;)

/var/log
11-17-2002, 07:51 AM
Crond just checks the tasks it has to run, every minute. It will start checking from the moment the server is up. So if you system goes down at 10:00 (crond gets stopped) and is up again at 11:30 (cron daemon restarts) and you have a job that is supposed to run everyday at 10:15, it will not get run until 10:15 the next day.

yellow_belly
11-17-2002, 08:38 AM
Originally posted by aragon
is that a question? Hi - sorry I should have made that clearer :o - its the answer.

YB

chuckt101
11-18-2002, 09:44 AM
Makes sense. Thanks! :cartman: