Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: Cron Jobs That Run For Too Longby somebox (Initiate) |
on Jan 11, 2006 at 06:33 UTC ( [id://522384]=note: print w/replies, xml ) | Need Help?? |
I'm the person that posed the question to beppu ;) Thanks for the great answers, I'm glad I finally made it on to perlmonks! So... Proc::Podfile didn't work out for me too well. I couldn't seem to get it working right. I might have been using it wrong, or perhaps I just didn't understand how to use it from reading the docs. Then I found File::Pid, and I'm very happy. Unfortunately, it is not smart enough to release the pidfile if the script crashes, but that's not a big deal for my current needs. Here was the implementation I used. I decided to allow my script to get a --force flag, in case it was really important that the script run at a certain time (even if a crash happened and there's a pid file hanging around). Under normal circumstances, the script will exit if another instance is discovered.
somebox
In Section
Seekers of Perl Wisdom
|
|