Is there any way of setting up search path for cron?
-for inetd server command
nobody at tekecs.GWD.TEK.COM
Thu Mar 9 09:17:44 AEST 1989
In article <4536 at m2c.M2C.ORG> chiang at odin.m2c.org (Rit Chiang) writes:
>I am setting up a script command in crontab. Now the script contains
>a few other command in /usr/local/bin. However, these commands are
>not absolutely specified in the script. The run got aborted due to
>the fact that cron cannot execute the commands. My question is whether
>there is any way to specify a search path for cron (similar to set path
>command in the .cshrc file).
The easiest and probably most correct way is to set the PATH variable in
your script. Then, in your crontab put the entire path to the script.
(This is not a bad idea in any case for the security-conscience type :-)
IE: In a /bin/sh script add:
PATH=/bin:/usr/bin:/usr/local/bin
export PATH
-Jeff
--
Jeff Beadles
jeff at quark.WV.TEK.COM
More information about the Comp.unix.questions
mailing list