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 reply to Re: How to read a file after a certain interval continuously
by muba
in thread How to read a file after a certain interval continuously
by ghosh123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |