Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2013 12:26:59 +0100
From:      Paul Macdonald <paul@ifdnrg.com>
To:        freebsd-questions@freebsd.org
Subject:   test if script called by cron
Message-ID:  <5236EB03.7040001@ifdnrg.com>

next in thread | raw e-mail | index | archive | help

Hi,

Is there a simple way of testing whether a given script was called via cron,

I'd rather find a solution that would work from within the script rather 
than setting an environment variable in the crontab.

thanks
Paul.

(anyone here going to EuroBSD con?)

-- 
-------------------------
Paul Macdonald
IFDNRG Ltd
Web and video hosting
-------------------------
t: 0131 5548070
m: 07970339546
e: paul@ifdnrg.com
w: http://www.ifdnrg.com
-------------------------
IFDNRG
40 Maritime Street
Edinburgh
EH6 6SA
----------------------------------------------------
High Specification Dedicated Servers from £100.00pm
----------------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5236EB03.7040001>