This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I want to cron/at a bash script but have
it check to see if another instance of the script is already
running.
I did a ps -Wl and a ps -ef while I had the script
running and while I saw the /usr/bin/bash executables (my current shell and the
shell I wanted to detect) they did not contain enough information to
differentiate between the two shells.
Any ideas of how I can determine this? I thought of
using a temp file, but if the script terminates abnormally it might not cleanup
it's files, causing the next cron job to not run, thinking that the other script
is still running.
Basically I'm trying to introduce some error
recovery into a script. So that if it terminates, another instance will be
started.
|
Attachment:
smime.p7s
Description: application/pkcs7-signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |