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

Reply via email to