Page 1 of 1

Problems configuring crontab

Posted: 2010-12-15 16:00
by fisi2000
Hello!

I have problems configuring a cronjob.

Here is my cron-file:

Code: Select all

03 14 * * 3    /opt/reporting/bin/kul.pl > /opt/reporting/log/kul.log
It starts normally every wednesday at 14:03 but I get the following message in my root mail:

Code: Select all

install_driver(Oracle) failed:5.8.8/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.11.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.
 at (eval 915) line 3
Compilation failed in require at (eval 915) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at /opt/reporting/bin/kulanzen.pl line 99
Interesting: When I start the script manually by changing the directory and then running the script, it runs normally. This way is how I start the script normally:

Code: Select all

cd /opt/reporting/bin
./kul.pl
Can anyone help me??? Is it a permission problem? :-?
Thanks in advance!

Re: Problems configuring crontab

Posted: 2010-12-15 16:11
by Joe User
fisi2000 wrote:

Code: Select all

cd /opt/reporting/bin
./kul.pl
Put that code along with all needed environment-variables in a shell-script and start that shell-script via cron.

Edit: too slow, but anyway ;)

Re: Problems configuring crontab

Posted: 2010-12-15 17:48
by fisi2000
Thanks! I'll try it!

Re: Problems configuring crontab

Posted: 2010-12-16 06:33
by fisi2000
Setting the environment variables within the shell script fixed my problem ^:)^

Code: Select all

ORACLE_HOME=$ORACLE_BASE/product/10.2.0
$ export ORACLE_HOME
Thanks a lot!