---------- Forwarded message ----------
From: Peter Pöml <[email protected]>
Date: Sun, Feb 21, 2010 at 8:51 PM
Subject: [mirror discuss] ANN: withlock - reliable & easy locking for cron jobs
To: [email protected]


Hi,

this is a one-time post to announce the creation of "withlock" - a
locking wrapper script to make sure that some program isn't run more
than once. It is ideal to prevent periodic jobs spawned by cron from
stacking up. The locks created are valid only while the wrapper is
running, and thus will *never* require additional cleanup, even after
a reboot. This makes the wrapper safe and easy to use, and much better
than implementing half-hearted locking within scripts.

Usage is simple. Instead of your command
 CMD ARGS...

you simply use
 withlock LOCKFILE CMD ARGS...


If you are a mirror admin, there is a 99.9% chance that you might want
to use this locking wrapper. Likely you ran into the situation where a
script was (unexpectedly...) not finished before it was started
another time; and/or you actually hacked some kind of locking into a
script to prevent that from happening.

Since I suffered the same situation for some years, I looked around
for solutions, and since I couldn't find one, I finally took the time
to create one. The resulting wrapper is used in production since
summer 2009, and proved to work reliably. Put the wrapper around all
your cron jobs and be happy :-)


Home page: http://code.google.com/p/withlock/

Features:
 - locks that never need a cleanup, whatever might happens
 - can wait a defined time for a lock to become "free"
 - makes sure that lock files aren't created in unsafe locations (to
prevent symlink attacks)
 - easily installed (it's just one file), highly portable

Requirements:
 - Python 2.4 or newer
 - lots of platforms are supported (see list on home page)

For more information, please come to http://code.google.com/p/withlock/ .

Thanks,
Peter

PS. Apologies to those of you who received this mail more than once,
due to crossposting to some different forums in order to reach most
people
_______________________________________________
discuss mailing list
Archive: http://mirrorbrain.org/archive/discuss/

Note: To remove yourself from this mailing list, send a mail with the content
       unsubscribe
to the address [email protected]



-- 
(( Anthony Bryan ... Metalink [ http://www.metalinker.org ]
  )) Easier, More Reliable, Self Healing Downloads

-- 
You received this message because you are subscribed to the Google Groups 
"Metalink Discussion" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/metalink-discussion?hl=en.

Reply via email to