From owner-freebsd-questions@FreeBSD.ORG Mon Feb 26 17:11:27 2007 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7E0E16A400 for ; Mon, 26 Feb 2007 17:11:27 +0000 (UTC) (envelope-from robin@reportlab.com) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.freebsd.org (Postfix) with SMTP id 59A1F13C474 for ; Mon, 26 Feb 2007 17:11:22 +0000 (UTC) (envelope-from robin@reportlab.com) Received: (qmail 50062 invoked from network); 26 Feb 2007 17:11:22 -0000 Received: from 217.196.247.135 (HELO ?192.168.0.3?) (217.196.247.135) by relay00.pair.com with SMTP; 26 Feb 2007 17:11:22 -0000 X-pair-Authenticated: 217.196.247.135 Message-ID: <45E31546.6040905@chamonix.reportlab.co.uk> Date: Mon, 26 Feb 2007 17:13:42 +0000 From: Robin Becker User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Chuck Swiger References: <45E3089F.9070000@chamonix.reportlab.co.uk> <45E310C7.1020903@mac.com> In-Reply-To: <45E310C7.1020903@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Subject: Re: cron mystery X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2007 17:11:27 -0000 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