Typically the problem in cron jobs is that the cron process won't automatically load all the environment variables you take for granted in an interactive session such as $ORACLE_SID, $ORACLE_HOME, $PATH containing $ORACLE_HOME/bin, $LD_LIBRARY_PATH, maybe $CLASSPATH etc. If you write (or already have) a settings script you'll need to call it from the script you run in cron, e.g:
. /some/explicit/path/oracle_envs
btw I think in csh you set environment variables with something weird like
set variablename = value (for a local variable)
or
setenv variablename = value (for an exported variable)
Does it have to be csh? Kind of makes everything harder...
1. how to set variables in your shell; this may depend on the type of shell, my examples are for ksh, I can only guess they will work in other shells (shells shouldnt be that different)
2. using variables: its like you say, create a new script, which first initiates its variables, then perform the other scripts (which will be using these variables) If this script works from command line, it should work from cron as well
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE