cron environment
Mike Bilow
mikebw at colossus.bilow.com
Wed Mar 15 18:23:50 EST 2000
Note that several major versions, such as Vixie Cron, accept environment
variables in the crontab itself. See "man 5 crontab" if your version has
such support. (Debian's standard cron will do this.)
-- Mike
On Tue, 14 Mar 2000 dmoylan at ibm.net wrote:
> >> (dmoylan at ibm.net)
> >> in executing scripts called under crontab, my local environment
> >> variables are not recognized. is there some simple way to make
> >> this happen?
>
> > (kclark at cabletron.com)
>
> > Assuming you're trying to start a shell script via cron, add something
> > like this:
> > . $HOME/.profile
> > to the top of your shell script. If you're not starting a shell
> > script, create a shell script wrapper around your intended program
> > and perform this action in that.
>
> > cron is *famous* for starting programs with a dearth of environment
> > variables...
>
> yup, that's it! the wrapper worked fine to play my perl scripts.
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).
More information about the Discuss
mailing list