Problems configuring crontab

Bash, Shell, PHP, Python, Perl, CGI
fisi2000
Posts: 3
Joined: 2010-12-15 15:54

Problems configuring crontab

Post 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!
User avatar
Joe User
Project Manager
Project Manager
Posts: 11176
Joined: 2003-02-27 01:00
Location: Hamburg

Re: Problems configuring crontab

Post 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 ;)
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
fisi2000
Posts: 3
Joined: 2010-12-15 15:54

Re: Problems configuring crontab

Post by fisi2000 »

Thanks! I'll try it!
fisi2000
Posts: 3
Joined: 2010-12-15 15:54

Re: Problems configuring crontab

Post 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!