Score:0

cron is not running

rs flag

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

cyberbrain avatar
cn flag
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?
Score:0
in flag
  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

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.