From owner-freebsd-questions@FreeBSD.ORG Thu Jun 8 16:14:13 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A659116B2D4 for ; Thu, 8 Jun 2006 14:27:44 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 018A443D46 for ; Thu, 8 Jun 2006 14:27:43 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.4) id k58ERMsB048547; Thu, 8 Jun 2006 09:27:22 -0500 (CDT) (envelope-from dan) Date: Thu, 8 Jun 2006 09:27:22 -0500 From: Dan Nelson To: Atom Powers Message-ID: <20060608142722.GD72957@dan.emsphone.com> References: <200606080321.k583Lto6083694@banyan.cs.ait.ac.th> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.5-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: Olivier Nicole , freebsd-questions@freebsd.org Subject: Re: how does cron exec jobs? 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: Thu, 08 Jun 2006 16:14:14 -0000 In the last episode (Jun 07), Atom Powers said: > On 6/7/06, Olivier Nicole wrote: > >> How can I simulate a cron job from the shell? There must be > >> something different about the way cron is executing this > >> command... > > > >Counld be different environment variables set, different working > >directory... > > That's what I'm trying to find out. The cron man pages are ... empty > on the subject. > > >Any diagnostic when it hangs? > > Not that I can tell. It runs on schedule but it never clears it's > locks (which it puts on files at is edits them) as it is supposed to; > and it does when run from the shell. > > So it truth, it's not so much that it "hangs", it does terminate, but > it doesn't honor it's lock time-outs like it does when run outside of > cron. Try running it from truss (truss -f -o /var/tmp/truss.out mycommand), and see if there's anything interesting in the log. -- Dan Nelson dnelson@allantgroup.com