Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Signal to a sleeping Perl program

by soonix (Canon)
on Jan 17, 2020 at 19:39 UTC ( #11111546=note: print w/replies, xml ) Need Help??


in reply to Signal to a sleeping Perl program

I had the opposite idea of davido's: if you loop with a sleep, you could extend the loop condition like this:
while (! -e '/predefined/location/time_is_up') { do {'your thing'}; sleep 900; }
or, in appropriate places
exit if -e '/predefined/location/time_is_up';
This would cause the script to end if you create that file.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2020-05-30 11:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (171 votes). Check out past polls.

    Notices?