bowei_99 has asked for the wisdom of the Perl Monks concerning the following question:
I have a script that needs to be running continuously as a service on a cluster, so it can failover to another node if need be. The cluster software is working fine, but the cron part is a little iffy.
Specifically, when I launch it using perl script.pl, the script
Anybody ran into this before? I'm open to using something other than Schedule::Cron, assuming it will work on a clustered failover system, so normal unix cron won't work. This is my code: ...
use Schedule::Cron; #Variable declarations my $rootdir = "/testdir"; # Initialize and run the cron job. Note that this is continuous by na +ture. 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"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Schedule::Cron job starts, but never stops
by jkeenan1 (Deacon) on Jun 10, 2006 at 02:06 UTC | |
Re: Schedule::Cron job starts, but never stops
by graff (Chancellor) on Jun 10, 2006 at 14:57 UTC |