jimbus has asked for the wisdom of the Perl Monks concerning the following question:
Greeting,
I've got a Perl script that runs via cron every 15 minutes and it does this pretty happily. I need to make some changes so that the system is more self-recovering in the event of a network outage or something that prevents the reporting system from getting the files it needs to process. The problem is I'm concerned that it could easily end up running longer than its window when trying to recover and ended up with multiple instances competing.
I'd like to get some input on how to manage this... Should I have a fixed time for the script to execute? Should the next instance tell the previous to clean up and exit gracefully? Should I let the first one finish its natural course and cancel new ones until it is done?
My vision is to have each instance do what it can to catch things up and exit before/as the next one starts, but I'm not sure how best to go about that.
Thanks,
--Jimbus aka Jim Babcock
Wireless Data Engineer and Geek Wannabe
jim-dot-babcock-at-usa-dot-com
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Of cron job management
by friedo (Prior) on Aug 22, 2006 at 16:01 UTC | |
by mpeters (Chaplain) on Aug 22, 2006 at 17:23 UTC | |
Re: Of cron job management
by madbombX (Hermit) on Aug 22, 2006 at 16:22 UTC | |
Re: Of cron job management
by andyford (Curate) on Aug 22, 2006 at 16:48 UTC | |
Re: Of cron job management
by shmem (Chancellor) on Aug 22, 2006 at 21:38 UTC | |
Re: Of cron job management
by blahblahblah (Priest) on Aug 28, 2006 at 18:57 UTC |