Ed, thank you for the reply, but now I a bit confused. I did an env as root and a huge list of settings came up. I then had cron submit the env commandto a file(env > /tmp/env.log) and I was suprised. The path I set(roots path to be exact) wasn't there.Here is the log I got: SHELL=/bin/sh PATH=/usr/bin:/bin PWD=/root SHLVL=1 HOME=/root LOGNAME=root _=/usr/bin/env I rechecked /etc/crontab and the path I put in there is there. So where is my path statement or am I wrong in thinking that an env command from cron would show the "new" path. thanks Mace --- "Edmund R. MacKenty" <[EMAIL PROTECTED]> wrote:
> On Tuesday 23 October 2007 09:44, LJ Mace wrote: > >We are Suse9,Z/VM 5.2 shop. > >I'm having a small problem and am wondering if > someone > >can help me out. > >I've written / integrated some scripts to bring > down > >DB2,WAS,CM, then backup/zip the files up ,and > restart > >the systems. > >All the scripts work fine separately and together > if > >I'm am logged on as root, but if I submit the same > >script using crontab everything BUT the startup > works. > >What happens is the system looks as if everything > is > >up(per the task count) but we are unable to log on > to > >our DB using WAS. > > All we then do is su into root run the startup > >procedure and everything works. > >All the proper calls /paths are in the scripts and > I > >have even placed roots' path in the path stmt in > >/etc/crontab. > > THis sounds like a difference in the process > environments. When you log > in, /etc/profile and a number of other scripts are > run for you and these set > up many environment variables. But when a cron job > is started, none of that > setup occurs. You can either make your scripts > source those startup files, > or figure out which environment variables are not > getting set and run those. > > Because this is DB2, the most likely thing that is > not getting run is the > $HOME/db2profile script. This sets up a number of > environment variables that > DB2 requires to do anything, such as DB2INSTANCE. > Try putting this command > at the beginning of your script: > > source $HOME/db2profile > > and see if that doesn't fix things. If not, use > env(1) to dump out your > environment when logged in and from the cron job, > and compare the two. > - MacK. > ----- > Edmund R. MacKenty > Software Architect > Rocket Software, Inc. > Newton, MA USA > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access > instructions, > send email to [EMAIL PROTECTED] with the > message: INFO LINUX-390 or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
