[RndTbl] Potentially long cron jobs
Gilbert E. Detillieux
gedetil at cs.umanitoba.ca
Thu Apr 1 14:02:08 CDT 2010
On 2010-04-01 13:06, Kevin McGregor wrote:
> I want to run something via cron which will take anywhere from less than
> a minute to a day or so (possibly). Most of the time it will be well
> under an hour, and I'd like it to run hourly, except if it's still
> running, in which case nothing more need be done.
> What the best way to do that?
This came up on the CentOS-mirror list back in February. Proposed
http://djlab.com/2009/10/lockfiles-in-bash/ [similar to Sean's solution]
http://code.google.com/p/withlock/ [requires Python 2.4]
flock(1) [may not be available other than on Linux?]
Hope this helps.
Gilbert E. Detillieux E-mail: <gedetil at cs.umanitoba.ca>
Dept. of Computer Science Web: http://www.cs.umanitoba.ca/~gedetil/
University of Manitoba Phone: (204)474-8161
Winnipeg MB CANADA R3T 2N2 Fax: (204)474-7609
More information about the Roundtable