Re: ksh script question
- From: Gene Sais <Gsais@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Jan 2006 14:56:28 -0500
|
I like to use a marker file. It works great if you have a job that takes longer to run than its frequency interval :)
# Begin Script
semfn=/tmp/`basename $0`.${sid}.RUNNING # Semaphore Filename, Are we running already?
if [ -f $semfn ] then echo "%-Warn, $0 is Already Running, to continue: rm $semfn" return 1 fi touch $semfn # ... Processing stuff
rm $semfn # We are done, so delete semaphore # End Script
>>> mschlechte@xxxxxxxxx 01/26/06 2:39 PM >>> If I have a script scheduled via cron how do I check to see if it is already running and therefore not run it a second time?
TIA, Mark
|
- Follow-Ups:
- Re: ksh script question
- From: Yves Dorfsman
- Re: ksh script question
- Prev by Date: Re: ksh script question
- Next by Date: Re: ksh script question
- Previous by thread: Re: ksh script question
- Next by thread: Re: ksh script question
- Index(es):
Relevant Pages
|
|