use Schedule::Cron; #Variable declarations my $rootdir = "/testdir"; # Initialize and run the cron job. Note that this is continuous by nature. my $cron = new Schedule::Cron(\&dispatcher, ); #$cron->add_entry("0 15 * * * *", $cron->add_entry("0-59 * * * * *", {'subroutine' => \&GetStats, } ); $cron->run(detach=>1, pid_file=>"$rootdir/$0.pid"); ################################################ # Subroutines to be called sub dispatcher { print "ID: ",shift,"\n"; print "Args: ","@_","\n"; }