[RndTbl] Potentially long cron jobs
peter at pogma.com
Thu Apr 1 16:57:59 CDT 2010
On 04/01/2010 01:18 PM, Sean Walberg wrote:
> if [ -f $TURD ]; then
> touch $TURD
> # do stuff
> rm $TURD
I find it helpful to have:
trap "rm -f $TURD" 0
So that the file will be removed when the shell exits.
I have also used the procmail 'lockfile' command for situations where I
wanted a shorter term lock.
More information about the Roundtable