Re: Am I running from cron?

From: justin.bleistein@SUNGARD.COM
Date: Thu Dec 19 2002 - 15:10:22 EST


I would imagine you'd have to check the "echo $$" variable for parent
process id and cross reference that with the process id of cron. Just an
educated guess.

--Justin Richard Bleistein
Unix Systems Administrator (Sungard eSourcing)
Desk: (856) 866 - 4017
Cell: (856) 912-0861
Email: justin.bleistein@sungard.com

                      "Taylor, David"
                      <DTaylor@WBMI.COM To: aix-l@Princeton.EDU
> cc:
                      Sent by: IBM AIX Subject: Am I running from cron?
                      Discussion List
                      <aix-l@Princeton.
                      EDU>

                      12/19/2002 02:52
                      PM
                      Please respond to
                      IBM AIX
                      Discussion List

Is there anyway from within a script to determine if it is being run from
cron?

TIA

David

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:25 EDT