Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)

by tokpela (Chaplain)
on Dec 03, 2009 at 10:25 UTC ( #810796=note: print w/ replies, xml ) Need Help??


in reply to RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)

I would call this a Mutex and would name accordingly. Maybe something like Process::Mutex?

There are a few mutex implementations already on CPAN. I have used the Win32::Mutex module a bit in my development.

If you are going to create a generic module, I would provide different solutions depending on the OS. The above solutions using flock should work well on *nix systems while the Win32::Mutex provides an interface for Windows.

  • Comment on Re: RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)

Replies are listed 'Best First'.
Re^2: RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)
by Anonymous Monk on Dec 03, 2009 at 10:38 UTC
    flock works on windows too

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://810796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2016-06-30 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (391 votes). Check out past polls.