Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • single instance! (Score:2, Insightful)

    by echo (2881) on 2003.10.24 6:10 (#25135)
    I've been bitten by this so many times in the past that I now never ever write a cronjob without inserting a few lines of code that ensure that no previous instance of the cronjob is running, and sends me mail if it's the case.
    • FreeBSD has a nice program called lockf(1) for dealing with similiar situations. It just grabs a lock, runs a command and releases the lock. very handy.


      • There exist CPAN modules like Proc::Pidfile, Proc::PID::File and probably other which help to assure you don't run more that one instance of the process. I used one of them in the past but forgot which one so cannot recommend any of them.

        Ilya Martynov ( [])