in reply to Making a program stop executing for five minutes
I've thought about making it a cron job that is called every five minutes, but that would add some complexity, since the process has to know how often it failed when it is checking out some stats every five minutes.
Everyone was quick (and correct) to point out the merits of sleep(), but to answer this part of your question - persist your data out to a file after you run, and persist it back in when you get restarted from cron.
Depending on the details of what you're trying to do, this might be the better soloution.
For anything beyond very simple persistance, may I heartily reccomend getting cozy with:
use Data::Dumper;
which has been part of the standard Perl distribution for some time. Great stuff.
Peace,
-McD
|
|---|