* Atom Powers <[EMAIL PROTECTED]> [2006-06-07 15:48:35 -0700]:
> I have a cronjob ( cfexecd -F ) that often hangs; but no matter how I
> run it from the shell ( sh -c "cfexecd -F" & ) it never hangs.
> 
> How can I simulate a cron job from the shell?

Whenever you have a problem like this (ie. "foo works perfectly from the
command line but not from cron"), you should always run /usr/bin/env (or
/bin/env) from cron, and then manually run your script with that same
environment (unsetting any envariables you need to get your shell to
match that of the cron environment) -- that will show you fairly quickly
what is wrong.

Usually it is just a PATH issue, but sometimes it may be some missing
envariable that you didn't even realize existed (that your script
depended on it).

Thomas

-- 
N.J. Thomas
[EMAIL PROTECTED]
Etiamsi occiderit me, in ipso sperabo
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to