unless I am overlooking something obvious, my sample code would run "stuff" at every hour, on the hour.
Well, except the first time, that would run inmediately, but that can be changed easily:
my $first = time; while (1) { # Do stuff here; my $next = int((time - $first + 3599)/3600) * 3600; sleep ($first + $next - time); }
In reply to Re^4: Pause Loop
by salva
in thread Pause Loop
by pyro.699
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |