Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Auto-restarting script if it dies

by mojodaddy (Pilgrim)
on Mar 09, 2007 at 12:24 UTC ( #603978=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    print "Script says: 'Hey, I just started running!'\n";
    sleep 60; # or whatever
    print "Script says: 'Boy, I'm bushed! I'm gonna go lie down.'\n";
    
  2. or download this
    #!/usr/bin/perl
    
    # check_if_its_running.pl
    ...
    sub start_it {
        system("perl always_be_running.pl");
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://603978]
Approved by Corion
Front-paged by moklevat
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2021-01-24 00:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?