Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: How many scripts running?

by Corion (Patriarch)
on Dec 15, 2019 at 08:37 UTC ( [id://11110171]=note: print w/replies, xml ) Need Help??


in reply to How many scripts running?

If you only want a single instance of your script running, the easiest approach is to lock the script file itself while the script is running. See Highlander for that approach.

Of course, the locking needs to be done in the top-level invocation, so the best approach is to have a separate top-level script that gets invoked and that locks itself.

Replies are listed 'Best First'.
Re^2: How many scripts running?
by luxs (Beadle) on Dec 15, 2019 at 08:42 UTC
    How many copies i want to run - lets say i will define it in config file for this script

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-20 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found