![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Re^3: Auto-restarting script if it diesby ant (Scribe) |
on Mar 12, 2007 at 12:35 UTC ( #604332=note: print w/replies, xml ) | Need Help?? |
This could be just me, but it seems a bit odd to start one script, and then start another script to check the first script.
Perhaps you could in the checker.pl delete the checkme.txt file (under the line where you declare var $checkme, that way, on start up it's deleted and does not pick up an old version of the file with an old temp file name, as checkme.txt is never deleted any where in your code) Run the checker.pl script, first time in the loop, file does not exist, starts always_running.pl and creates checkme.txt and then the checker script continues checking checkme.txt. Just trying to refine the process, I liked the idea lots. Ant
In Section
Seekers of Perl Wisdom
|
|