[X-Unix] Cron problem

Eugene list-themacintoshguy at fsck.net
Thu Jun 23 02:59:52 PDT 2005


On Thu, Jun 23, 2005 at 01:37:08AM CDT, Norman Cohen <nacohen at mac.com> wrote:
: On Jun 22, 2005, at 4:21 PM, Eugene wrote:
: >On Wed, Jun 22, 2005 at 05:23:29PM CDT, Norman Cohen  
: ><nacohen at mac.com> wrote:
: >:
: >: 2 points. With cron you need the full path to the date
: >: function. Type "which date" in the terminal to get the path.
: >
: >Actually, crontabs let you set the environment, so you can add
: >other directories to PATH.
: 
: Eugene is, of course, correct. I was typing on a blackberry and  
: thought that the quickest approach to solving the OP's question was  
: to suggest the full path to the date command solution, rather than  
: trying to explain setting the PATH variable. Sorry for the incomplete  
: answer.

The PATH setting in crontabs is a little confusing too.  Sometimes the
binaries you need are in /usr/bin or some other directory, which are not
always part of PATH on some Unix distros.  But on OS X, it's /bin/date.
Also, crontabs often get their PATH setting from the shell, which in
turn usually includes /bin and /usr/bin.

Nothing against Norman's answers, which were very direct and should have
been enough to solve the problem.  Just feeling academic.


-- 
Eugene
http://www.coxar.pwp.blueyonder.co.uk/


More information about the X-Unix mailing list