ra93013 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use Schedule::Cron; # Subroutines to be called sub dispatcher { print "ID: ",shift,"\n"; print "Args: ","@_","\n"; } sub check_links { $datetime = scalar(localtime(time)); open(F,'>>datetime.dat') || die $!; print F "$datetime\n"; close(F); } # Create new object with default dispatcher my $cron = new Schedule::Cron(\&dispatcher); $cron->add_entry("0-59/1 * * * Mon-Fri",\&check_links); # Run scheduler $cron->run(detach=>1);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: schedule::cron Not Working
by marinersk (Priest) on Nov 05, 2013 at 18:15 UTC |