libclntsh.so.11.1: cannot open shared object file.
Possibly you want to specify PATH
— and also ORACLE_HOME
and LD_LIBRARY_PATH
— so that cron(1)
knows where to find binaries.
Read "5 Crontab environment" here.
Cron does not load the user's profile when running a task and you have to include the profile in your shell script explicitly.
Example documentation
The libs are located in
/u01/app/oracle/product/11.2.0/xe/lib
(For Oracle XE) or similar.
You should add this path to /etc/ld.so.conf
or if this file shows only an include location, as in a separate file in the /etc/ld.so.conf.d
directory
I have oracle.conf in /etc/ld.so.conf.d
, just one file with the path. Nothing else.
Of course don't forget to run ldconfig as a last step.