On Wed, 2006-07-05 at 22:50 -0700, BenBart wrote:
> Hi all,
> 
> How do I prevent multiple instance of the same script from running?
> 
> That is for example, if I have a script named script1.pl and it is 
> already running, I want the script to be able to check that it is 
> already running and then just exit ...
> 
> Is this possible to do in both UNIX and Windows?

CPAN module  Sys::RunAlone

http://search.cpan.org/~elizabeth/Sys-RunAlone-0.05/lib/Sys/RunAlone.pm

Also interesting is 
Sys::RunAlone 
make sure only one invocation of a script is active at a time 
Sys-RunAlone-0.05 - 11 Jun 2006 - Elizabeth Mattijsen 

Sys::RunUntil 
make sure script only runs for the given time 
Sys-RunUntil-0.02 - 19 Jul 2005 - Elizabeth Mattijsen 

Sys::RunAlways 
make sure there is always one invocation of a script active 
Sys-RunAlways-0.03 - 11 Jun 2006 - Elizabeth Mattijsen



-- 
Ken Foskey
FOSS developer


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to