in reply to Best way to make a script run persistently (daemon)
off.txt is a blank file. So then my script runs and runs and runs until I put something into off.txt, at which point the script breaks out of the loop.while (1) { open OFF, "off.txt"; last if <OFF>; # all the code goes here sleep 5; } print "you turned me off!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Persistence
by Ven'Tatsu (Deacon) on Oct 09, 2001 at 00:18 UTC |