> -----Original Message----- > From: Shawn Corey [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 08, 2005 10:59 AM > To: beginners@perl.org > Subject: Re: processing at preset times > > Frank Bax wrote: > > I realise that my subject line might suggest use of cron, but this is > > not workable unless there is some way for two scripts to communicate > > with each other. If this could work, the processing script would > > probably still need a thread to do communication with timer script > anyway. > > Actually, using cron may not be a bad idea. There is nothing like having > a 100 hour job crash after 99 hours and 59 minutes. If you can, consider > rewriting the program so it works in small chunks. Use cron to restart > the program at regular intervals. You can get the status of the process
You may also want to consider init for process respawning. You can also set the runlevels that the script will execute (in the event that you need it to run at lower/higher runlevels across reboots). > by examining the state of the temporary files, using another cron job. > Even if you have a power failure, the process will be restarted when the > computer reboots. An added bonus is you don't have to login in the wee > hours of the morning just to make sure the program is still running. > > -- > > Just my 0.00000002 million dollars worth, > --- Shawn > > "Probability is now one. Any problems that are left are your own." > SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_ > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>