Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2006 09:27:22 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Atom Powers <atom.powers@gmail.com>
Cc:        Olivier Nicole <on@cs.ait.ac.th>, freebsd-questions@freebsd.org
Subject:   Re: how does cron exec jobs?
Message-ID:  <20060608142722.GD72957@dan.emsphone.com>
In-Reply-To: <df9ac37c0606072123k2c1ef772u760f088e32cac1b9@mail.gmail.com>
References:  <df9ac37c0606071548vea943fas284171d21da3fbd0@mail.gmail.com> <200606080321.k583Lto6083694@banyan.cs.ait.ac.th> <df9ac37c0606072123k2c1ef772u760f088e32cac1b9@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jun 07), Atom Powers said:
> On 6/7/06, Olivier Nicole <on@cs.ait.ac.th> 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



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