From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653755322185.tru64-unix-managers.marc@archive.invalid> From: Ralf Borowski Date: Wed, 03 Apr 2002 18:17:51 +0000 To: tru64-unix-managers Subject: Cron problem executing csh script X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653755322185 MIME-Version: 1 Content-Type: multipart/mixed; boundary="------=_NextPart_000_0001_01C1DB11.F62632B0" This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C1DB11.F62632B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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@tembec.ca ------=_NextPart_000_0001_01C1DB11.F62632B0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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<= /p>

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@tembec.ca=

 

------=_NextPart_000_0001_01C1DB11.F62632B0--