When cron jobs are run, login processing is _not_ performed. So the environment variables, such as PATH, etc., are _not_ set the same as when a login is done, or an "su -" command. If those things must be set, then the cron job should source those files before trying to do anything.
Mark Post -----Original Message----- From: Rich Smrcina [mailto:[EMAIL PROTECTED] Sent: Saturday, January 10, 2004 8:31 PM To: [EMAIL PROTECTED] Subject: Re: Cron Ralph, Usually the db2inst1 user is set up to execute the db2profile script in /home/db2inst1/sqllib/db2profile. I think this message is related to not executing that script. Try adding: . /home/db2inst1/sqllib/db2profile to /home/db2inst1/.profile or /home/db2inst1/.bash_profile then try your cron job again. On Fri, 2004-01-09 at 15:03, Noll, Ralph wrote: > I am trying to execute a cron job to backup db2.. > > my db2 user is db2inst1 > > i setup the crontab job as db2inst1 > > when i run it i get an error > > Output from command /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm .. > > SQL10007N Message "-1390" could not be retrieved. Reason code: "1". > > If I run the backup job logged in as db2inst1 no problem > > if i run the job logged in as root i get the same above error > > > so what i am asking is how do i setup a cron job to execute as user db2inst1?? > > thanks > > Ralph -- Rich Smrcina Sr. Systems Engineer Sytek Services - A Division of DSG Milwaukee, WI rsmrcina at wi.rr.com rsmrcina at dsgroup.com Catch the WAVV! Stay for requirements and the free-for-all. Update your zSeries skills in 4 days for a very reasonable price. WAVV 2004 in Chattanooga, TN April 30-May 4, 2004 For details see http://www.wavv.org
