how to run job again
am 16.11.2007 06:28:06 von Petr ViletaThis is not perl specific question but I programmed it in perl ;-)
I have script as cron job which download something from internet. If all
requested servers work then script run about 30 hours. But sometime some
server fail and my script stop for http read error. I create 30 cron jobs in
1 hour time interval. At script begin I test if some file is on disk and if
yes then what time is writed in this file. When the time is older then 120
minutes then I run script, in other case I assume that script is still
running and exit from new cron job. If this file not exist then I create it
and update time in file after all web read. I have LWP timeout set to 30
seconds.
I thinked about to run script once only and if some http read error occur
then sleep script for 60 minutes and restat it from begin, but this is not
good idea I think.
Have anybody some better idea how to guarantee that script complete work
even if some errors occur on servers I read?
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)