Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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


Comment on Re: running Perl scripts in the background
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://626174]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-12-19 04:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (70 votes), past polls