[Gllug] Cron?
Tethys
tet at accucard.com
Thu Oct 24 11:17:34 UTC 2002
Paul Roberts writes:
>You could make the script that performs your task create a temporary
>file when it starts, then delete it when its finished.
>
>Then, at the beginning of the script, you could just loop while that
>file exists.
Looping is a bad idea. If the lock file exists, just exit. You'll be
trying again in 2 minutes anyway. If you loop, and one process gets
confused and doesn't delete the lock file, then every two minutes,
you'll start a new one which will sit and loop, until eventually,
you fill up your process table.
You could loop a limited numebr of times -- say 3 retries, but in
this case, just exiting is probably a better strategy.
Tet
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list