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; } }
|
---|
In Section
Seekers of Perl Wisdom