how does cron exec jobs?
Dan Nelson
dnelson at allantgroup.com
Thu Jun 8 16:14:14 UTC 2006
In the last episode (Jun 07), Atom Powers said:
> On 6/7/06, Olivier Nicole <on at 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 at allantgroup.com
More information about the freebsd-questions
mailing list