Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Mechanism for ensuring only one instance of a Perl script can only run?

by LanX (Saint)
on Dec 02, 2022 at 16:29 UTC ( [id://11148501]=note: print w/replies, xml ) Need Help??


in reply to Mechanism for ensuring only one instance of a Perl script can only run?

Perl has flock command for this kind of problems.

This recent discussion might be of interest: File lock demo

please be aware that this also depends on the OS, I've tested it on Win.

(you havent been explicitly telling us which one you use, but crontab is usually more *nix'ish)

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re: Mechanism for ensuring only one instance of a Perl script can only run?

Replies are listed 'Best First'.
Re^2: Mechanism for ensuring only one instance of a Perl script can only run?
by redapplesonly (Sexton) on Dec 02, 2022 at 16:44 UTC
    Thanks Rolf! I'll look into your suggestion. Also, I edited my post to make it clear that I'm on a Ubuntu machine.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-19 21:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found