#!/bin/bash TURD=/var/run/mycron.lock if [ -f $TURD ]; then exit fi touch $TURD # do stuff rm $TURD
(yes, there's a potential race condition. Probably doesn't matter though)
Sean
On Thu, Apr 1, 2010 at 1:06 PM, Kevin McGregor kevin.a.mcgregor@gmail.comwrote:
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?
Kevin
Roundtable mailing list Roundtable@muug.mb.ca http://www.muug.mb.ca/mailman/listinfo/roundtable