Cron problem executing csh script

From: Ralf Borowski <rborowski_at_tembec.ca>
Date: Wed, 03 Apr 2002 13:17:51 -0500

Hello,
 
I'm running Tru64 5.1A with the aggregate patch kit loaded and have some
odd behavior with cron. I have a csh script designed to put oracle table
spaces into backup mode. When I log in as oracle and run the script,
all works ok. When the script is run via the oracle account's crontab
entry, it seems as if only the first line of the script executes.
 
The crontab entry was created using crontab -e when logged in as the
oracle user. The entry is:
 
20 09 * * * /bin/csh
/usr/tembec/oracle817/backup_scripts/build_archive_scripts.csh
 
The entry seems to be firing as scheduled.
 
The script is owned by oracle, and has permissions set to 755 as do the
*.scr scripts that are used as input for svrmgrl and sqlplus.
 
Here is the script:
 
touch last_runtime >> /usr/tembec/oracle817/backup_scripts/logfile
#
setenv ORACLE_SID rcs51 >> /usr/tembec/oracle817/backup_scripts/logfile
cd /usr/tembec/oracle817/backup_scripts/rcs51
sqlplus < ../build_archive_scripts.scr
svrmgrl < turn_archiving_on.scr
 
The first line (touch .) was added simply to determine if cron was
running the job. The output redirection was added to try to capture an
error message, but the logfile is always empty after the script is run
from cron.
 
Thanks in advance for any help you can provide.
 
Regards,
 
Ralf
 
Ralf Borowski
Senior Systems Specialist
Tembec Inc. - Pulp Group
Tel. (819) 627-4103
Fax. (819) 627-9908
rborowski_at_tembec.ca
 
Received on Wed Apr 03 2002 - 18:30:01 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:43 NZDT