Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2007 17:13:42 +0000
From:      Robin Becker <robin@reportlab.com>
To:        Chuck Swiger <cswiger@mac.com>
Cc:        FreeBSD Questions <questions@freebsd.org>
Subject:   Re: cron mystery
Message-ID:  <45E31546.6040905@chamonix.reportlab.co.uk>
In-Reply-To: <45E310C7.1020903@mac.com>
References:  <45E3089F.9070000@chamonix.reportlab.co.uk> <45E310C7.1020903@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Chuck Swiger wrote:
> Robin Becker wrote:
> [ ... ]
>> before
>> ##################
>> SHELL=/bin/sh
>> MAILTO=user
>>
>> 13 3 * * *      $HOME/bin/daily
>> 19 * * * *      $HOME/bin/hourly
>>
>>
>> after
>> ##################
>> SHELL=/bin/sh
>> MAILTO=user
>>
>> 13 3 * * *      /home/user/bin/daily
>> 41 * * * *      /home/user/bin/hourly
>>
>>
>> and at 41 past the hour the hourly job came back.
>>
>> Is it the HOME variable or the act of rewriting? User did have home 
>> defined in /etc/passwd.
> 
> I suspect that $HOME isn't being defined as one might expect-- cron 
> provides a very minimal shell environment for scripts it runs.
> 
except that I have exactly the same script running on another box with the same 
freeBSD version and that runs things fine. Looking in man 5 crontab seems to 
suggest that SHELL=/bin/sh & HOME, LOGNAME are set from the user passwd entry.
-- 
Robin Becker



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45E31546.6040905>