Thanks Unspawn for coming back to me. I had not even thought to check the mail log, it's always the obvious things that get missed. Anyway it doesn't seem to like line in either script as can be seen from the messages:
Message 217:
From
oracle@localhost.localdomain Wed Jan 10 00:30:01 2007
Date: Wed, 10 Jan 2007 00:30:01 GMT
From:
root@localhost.localdomain (Cron Daemon)
To:
oracle@localhost.localdomain
Subject: Cron <oracle@localhost> /home/oracle/backup/script/secfin
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/oracle>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=oracle>
X-Cron-Env: <USER=oracle>
/home/oracle/backup/secfin/
secfinWedJan10.dmp
/home/oracle/backup/secfin/
/home/oracle/backup/script/secfin: line 10: exp: command not found
&
Message 218:
From
oracle@localhost.localdomain Wed Jan 10 00:30:01 2007
Date: Wed, 10 Jan 2007 00:30:01 GMT
From:
root@localhost.localdomain (Cron Daemon)
To:
oracle@localhost.localdomain
Subject: Cron <oracle@localhost> /home/oracle/backup/script/secfin2
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/oracle>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=oracle>
X-Cron-Env: <USER=oracle>
/home/oracle/backup/secfin2/
secfin2WedJan10.dmp
/home/oracle/backup/secfin2/
/home/oracle/backup/script/secfin2: line 10: exp: command not found
The command in the script is:
exp system/manager@secfin FULL=Y file=/home/oracle/backup/secfin/"$dmp" log=/home/oracle/backup/secfin/"$logfile"
I did a man on exp and it's a recognised command. Could it be something to do with the fact that the oracle users default shell is KSH. But that's being sourced by the line #!/bin/sh right???