http://www.perlmonks.org?node_id=539594


in reply to Timers and timer expire handlers

You can make a cron-like process using a relative sleep...
Start your script with wperl.exe, running without console (check Daemonize process).
I ran a similar code, started with wperl.exe, at W2K without problems (except reboot or admin changes) ...
use strict; use constant HOUR=> 3600; use constant DAY => 24* HOUR; sub RunAtTime { my $RunAt = shift * HOUR; my $delta = time(); if ( $delta > $RunAt ) { $delta = DAY + $RunAt - ($delta % DAY); } else { $delta = $RunAt - ($delta % DAY) } } # daemonize ... at PerlIPC while ( 1 ) { sleep RunAtTime( 4 ); # ... your code ... }

--
Marco Antonio
Rio-PM