tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Cohen, Andy" <Andy.Cohen@cognex.com>
Subject: find out one's own PID when running from cron
Date: Fri, 19 May 2006 12:20:00 -0400	[thread overview]
Message-ID: <9D592DB37A92234AB635C5585D2D08190430BB86@cobra.pc.cognex.com> (raw)

Hi,
 
I have a shell script that runs from cron.  It needs to check if there
are still previous runs of itself still running and if so it needs to
kill them (but not kill itself).  I can get the shell script to find all
currently running copies of this script but the list includes the
current one but I only want to kill the previous ones.  How do I get the
shell script to find out its own PID?  I can do it at the command line
but when I try to do it when the script runs from cron I get an error
message:
 
    ps: no controlling terminal
 
Thanks,
Andy


                 reply	other threads:[~2006-05-19 16:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox