0

I have written below mentioned code and given oracle path but still I am unable to run the .sh file through the cronjob:

export PATH

export PS1='$PWD>'; export LANG=C; export LC_ALL=C; export EDITOR=vi;

export ORACLE_BASE=/home/app export ORACLE_HOME=/home/app/oracle/product/19.3 export TNS_ADMIN=$ORACLE_HOME/network/admin #export LD_LIBRARY_PATH=

sqlplus username/password@servicename @abc.sql

exit;

please help to set oracle path as well as to run the program

matigo
  • 22,138
  • 7
  • 45
  • 75
  • Did you test the script directly in the shell (without cron)?

    Can the cronjob reach and access the abc.sql file?

    Which PATH are you exporting? How did you find out that you need all the given exported environment variables?

    – cyberbrain Nov 03 '21 at 07:46

1 Answers1

0
  1. Check how the script work, by running it in the shell (./script.sh)
  2. Check how you specify the cron job parameters
  3. Check if the cron service is running

If its possible show us your cron config, will help a lot