Operating System - HP-UX
1752786 Members
5849 Online
108789 Solutions
New Discussion юеВ

How to schedule run make_tape_recovery

 
SOLVED
Go to solution
ng_7
Regular Advisor

How to schedule run make_tape_recovery

Hi, experts,

I have created a sh file : recovery.sh,

the permission of this file as shown below :
db1:/home/oraprod/scripts# ll recovery.sh
-rwxrwxrwx 1 root sys 31 Oct 8 09:39 recovery.sh

and the contains of the file :
db1:/home/oraprod/scripts# cat recovery.sh
cd /
make_tape_recovery -AIv

I create crontab by using root permission as shown below :
06 06 * * 1 /home/oraprod/scripts/recovery.sh 2>/tmp/als4.log

the make_tape_recovery is not run, and I get the error in als4.log as shown below :
/home/oraprod/scripts/recovery.sh[2]: make_tape_recovery: not found.


Any idea how to solve this problem ?
3 REPLIES 3
Dennis Handly
Acclaimed Contributor
Solution

Re: How to schedule run make_tape_recovery

You need to use the absolute path to make_tape_recovery. Or augment PATH to include that command.
V. Nyga
Honored Contributor

Re: How to schedule run make_tape_recovery

Hi,

for cron jobs you always have to set the complete path of a command, because for example /etc/PATH is only read after login of an user, not when starting a cron job!
Else, as said, you have to define PATH in the script.

Volkmar
*** Say 'Thanks' with Kudos ***
ng_7
Regular Advisor

Re: How to schedule run make_tape_recovery

Thank you Dennis and Nyga, I managed to schedule run make_tape_recovery by specifying full Path already.

thank you.