Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Auto-restarting script if it dies

by mojodaddy (Pilgrim)
on Mar 09, 2007 at 12:24 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others about the Monastery: (1)
As of 2024-04-18 04:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found