Re: ksh script question
- From: "Poland, Neil" <Neil.Poland@xxxxxxxxxxx>
- Date: Thu, 26 Jan 2006 14:28:34 -0600
Title: RE: ksh script question
And/or add a "lock" file.
Touch it at the beginning of the script and remove it at the end. If the file is still there you know the script is still running or the script failed before it completed.
I use both so if the process is gone and the file is there it alerts the Admin to a failure.
-----Original Message-----
From: IBM AIX Discussion List
To: aix-l@xxxxxxxxxxxxx
Sent: 01/26/2006 1:48 PM
Subject: Re: ksh script question
Put a wrapper around it......something like....
SCRIPT=blah
RUNNING=`ps -ef|egrep ${SCRIPT} | egrep -v egrep`
If [[ -n ${RUNNING} ]]
Then
SCRIPT
fi
_____
From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of
Mark Schlechte
Sent: Thursday, January 26, 2006 1:40 PM
To: aix-l@xxxxxxxxxxxxx
Subject: ksh script question
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
RBC Dain Rauscher does not accept buy, sell or cancel orders by e-mail,
or any instructions by e-mail that would require your signature.
Information contained in this communication is not considered an
official record of your account and does not supersede normal trade
confirmations or statements. Any information provided has been prepared
from sources believed to be reliable but is not guaranteed, does not
represent all available data necessary for making investment decisions
and is for informational purposes only.
This e-mail may be privileged and/or confidential, and the sender does
not waive any related rights and obligations. Any distribution, use or
copying of this e-mail or the information it contains by other than an
intended recipient is unauthorized. If you receive this e-mail in error,
please advise me (by return e-mail or otherwise) immediately.
Information received by or sent from this system is subject to review by
supervisory personnel, is retained and may be produced to regulatory
authorities or others with a legal right to the information.
E-mail messages are not encrypted. As such, client sensitive information
sent to or received from your RBC Dain Rauscher Financial Consultant
electronically may not be secure.
DISCLAIMER: The information transmitted is intended only
for the addressee and may contain confidential,
proprietary and/or privileged material. Any
unauthorized review, distribution or other use
of or the taking of any action in reliance upon
this information is prohibited. If you received
this in error, please contact the sender and
delete or destroy this message and any copies.
As of January 20, any e-mails addressed
to "cityregina.com" will not be delivered.
- 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):