Operating System - HP-UX
1834414 Members
1961 Online
110067 Solutions
New Discussion

Re: Is that cron problem or path link problem ?

 
Cat_4
Advisor

Is that cron problem or path link problem ?

Dear all,

I have an Oracle back up job works fines by typing program command on $ sign. I would like to put it into cron job. The crontab as follow :

# su oracle
$ crontab -l
01 00 * * 1 /home/oracle/backup/fullexp

However, error occur :

Error message :

Mon Sep 1 00:01:00 EAT 2003
/usr/lib/dld.sl: Can't open shared library: /hpx/work/ee/8.1.7.4/hpx32/src_0424/rdbms/lib//libwtc8.sl
/usr/lib/dld.sl: No such file or directory

and cronjob failed :
crontab log :

CMD: /home/oracle/backup/fullexp

> oracle 22509 c Mon Aug 18 00:01:00 EAT 2003

< oracle 22509 c Mon Aug 18 00:01:02 EAT 2003 rc=134

Please advise it should be cron problem or some of my path variable setting is incorrect ? I tried to file the file libwtc8.sl but cannot open:

#file /hpx/work/ee/8.1.7.4/hpx32/src_0424/rdbms/lib//libwtc8.sl

/hpx/work/ee/8.1.7.4/hpx32/src_0424/rdbms/lib//libwtc8.sl: cannot open

# file /usr/lib/dld.sl

/usr/lib/dld.sl: s800 shared library -not stripped

I do not have the direction on trouble shooting this. Please give me help !! Thanks a lot !!

Best regards,
Cat
4 REPLIES 4
T G Manikandan
Honored Contributor

Re: Is that cron problem or path link problem ?

Make sure you set your PATH and SHLIB_PATH variables in your cron script.


SHLIB_PATH=/usr/lib:$ORACLE_HOME/lib,..

Also do set ORACLE_HOME inside.
Cat_4
Advisor

Re: Is that cron problem or path link problem ?

Thanks. Should I just edit the crontab file as follow :

01 00 * * 1 /usr/bin/su -Oracle -c /home/oracle/backup/fullexp

or I need to edit your mentioned .profile ?

Cat
Patrick Wallek
Honored Contributor

Re: Is that cron problem or path link problem ?

Any problems you have with a cron job not running the same as it does when you run it from an interactive shell are almost always related to cron's lack of an environment.

When you set up a cron job you should set your environment specifically to what you need within the cron job itself. It is also a good idea to use the full path to any commands in a cron job.

I would set your SHLIB_PATH and/or LD_LIBRARY_PATH within the cron job itself. The environment you get with cron is VERY limited.
T G Manikandan
Honored Contributor

Re: Is that cron problem or path link problem ?

Yes,you are right!