Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: running Perl scripts in the background

by hawtin (Prior)
on Jul 12, 2007 at 08:51 UTC ( #626174=note: print w/replies, xml ) Need Help??


in reply to running Perl scripts in the background

I have run a number of these 'monster' processes, for example last year I converted my complete MP3 collection to a different bitrate by resampling my FLAC files, the process took 3 weeks. My assumption is always that we will have a power-cut at the worst moment, so I normally control the process with a loop like (from memory):

my $results_dir = "results"; mkdir $results_dir,0755 if(!-d $results_dir); foreach my $next_step (list_steps()) { next if(-r "$results_dir/$next_step.done"); $res = do_step($next_step); my $fh = IO::File->new(">$results_dir/$next_step.done"); print $fh $res; $fh->close(); } print "All steps done\n";

Of course I normally add the date, some other interesting details to the results files and a lot more checking

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://626174]
help
Chatterbox?
[Lady_Aleena]: karlgoethebier, when I don't know what I am looking at, it makes it hard to figure things out.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2017-06-26 09:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (575 votes). Check out past polls.