Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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 In reply to Of cron job management by jimbus
|
|