<div>#!/bin/bash</div><div>TURD=/var/run/mycron.lock</div><div>if [ -f $TURD ]; then</div><div> exit</div><div>fi</div><div>touch $TURD</div><div># do stuff</div><div>rm $TURD</div><div><br></div><div>(yes, there&#39;s a potential race condition. Probably doesn&#39;t matter though)</div>
<div><br></div><div>Sean<br><br><div class="gmail_quote">On Thu, Apr 1, 2010 at 1:06 PM, Kevin McGregor <span dir="ltr">&lt;<a href="mailto:kevin.a.mcgregor@gmail.com">kevin.a.mcgregor@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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&#39;d like it to run hourly, except if it&#39;s still running, in which case nothing more need be done.<div>

<br></div><div>What the best way to do that?</div><div><br></div><font color="#888888"><div>Kevin</div>
</font><br>_______________________________________________<br>
Roundtable mailing list<br>
<a href="mailto:Roundtable@muug.mb.ca">Roundtable@muug.mb.ca</a><br>
<a href="http://www.muug.mb.ca/mailman/listinfo/roundtable" target="_blank">http://www.muug.mb.ca/mailman/listinfo/roundtable</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Sean Walberg &lt;<a href="mailto:sean@ertw.com">sean@ertw.com</a>&gt;    <a href="http://ertw.com/">http://ertw.com/</a><br>
</div>