Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!tektronix!tekecs!nobody From: nobody@tekecs.GWD.TEK.COM (-for inetd server command) Newsgroups: comp.unix.questions Subject: Re: Is there any way of setting up search path for cron? Message-ID: <11117@tekecs.GWD.TEK.COM> Date: 8 Mar 89 23:17:44 GMT References: <4536@m2c.M2C.ORG> Reply-To: jeff@quark.UUCP (Jeff Beadles) Distribution: usa Organization: Tektronix, Inc., Wilsonville, OR Lines: 23 In article <4536@m2c.M2C.ORG> chiang@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@quark.WV.TEK.COM