Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How to read a file after a certain interval continuously

by muba (Priest)
on Feb 08, 2013 at 09:35 UTC ( #1017782=note: print w/ replies, xml ) Need Help??


in reply to How to read a file after a certain interval continuously

One of many approaches would be to do it like this:

my $interval = 60 * 5 # seconds * minutes my $run_when = time + $interval; while (1) { # ... if (time - $run_when <= 0) { do_the_stuff; $run_when = time + $interval; } }


Comment on Re: How to read a file after a certain interval continuously
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2015-07-30 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls