Personally, I see it as a security feature that cron does not behave in the same way as the login shell. If users are not the one submitting the cron jobs, you *could* set the path in the /etc/crontab and run the jobs from there. When I write my scripts, I am cafeful to always use absolute paths, even for mundane things like grep, find and so forth. That way I know exactly what is being called each time. In many scripts, I have files that define "global" variables and I access it from each script as necessary. Also be careful of the phrase "execute my /etc/profile.local in each script". If you executed it, simply by calling the name of the setenv script, the variables would only be valid in that script, but not in the script that called it. Instead, you need to souce the file ". setenv". Further, you do not have the danger that some user changes the order of the paths in .profile, which may end up breaking things. I did UNIX tech support for four years and I had a customer once who changed the order of the PATH. The created there own tool called "sort", which ended up breaking a number of tools. IMHO the tools were bugging since they did not use full paths, but changing the order of the directories was not necessarily a good thing. Regards, jimmo On Saturday 16 February 2002 21:49, Joseph Hobbs wrote:
Hey all, quick question.
I need to update the PATH variable on my box for EVERYONE. To do this, I just created a profile.local script and export the path there.
Since CRON does not run the profile, it doesn't pick up the new path. Because of this, my scripts can't located the setenv script (which sets my environment for all of my scripts/apps).
How can I set it up so that it ALWAYS picks up that path?
I was told that a workaround would be to execute my /etc/profile.local in each script. That would work, but it seems clunky. Is this all I've got?
Joe
===== Joseph Hobbs Ionic Productions LLC hobbsj@somecrazyfool.com
__________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com
-- --------------------------------------- "Science has promised man power...But, as so often happens when people are seduced by promises of power, the price is servitude and impotence. Power is nothing if it is not the power to choose." Joseph Weizenbaum of MIT said in reference to Computers. --------------------------------------- The Great Linux-NT Debate: http://www.jimmo.com/Linux-NT_Debate/index.html --------------------------------------- NOTE: All messages sent to me in response to my posts to newsgroups or forums are subject to reposting.