1824238 Members
3276 Online
109669 Solutions
New Discussion юеВ

crontab configutration

 
???_185
Regular Advisor

crontab configutration

I configured make_tape_recovery in crontab like this.
20 19 21 2 2 make_tape_recovery -Av &
but, it didn't work, why?
8 REPLIES 8
Sivakumar TS
Honored Contributor

Re: crontab configutration


Hi,

Always mention the OBSOLUTE PATH of the command to be executed in the crontab.

That could be the reason.

Regards,

Siva.
Nothing is Impossible !
Adisuria Wangsadinata_1
Honored Contributor

Re: crontab configutration

Hi ZungWon,

You need to create a file (eg. /usr/contrib/bin/make_ignite_master_tape.sh) with the contain of below :

/opt/ignite/bin/make_tape_recovery -A -I -v -x inc_entire=/dev/vg00 -a /dev/rmt/
0mnb > /tmp/make_master_tape.out 2>&1

After that, put on the crontab :

20 19 21 2 2 /usr/contrib/bin/make_ignite_master_tape.sh > /dev/null 2>&1

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Arunvijai_4
Honored Contributor

Re: crontab configutration

Hello,

You have to give full or absolute path in cron jobs just like, opt/ignite/bin/make_tape_recovery

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Indira Aramandla
Honored Contributor

Re: crontab configutration

Hi Zungwon,

Cron does not run profile therefore you have to initialise the variables in the script. So You have to give full or absolute path in cron jobs.



IA
Never give up, Keep Trying
Muthukumar_5
Honored Contributor

Re: crontab configutration

You've to setup PATH variable information in cron. Else simply use absolute path name.

20 19 21 2 2 /opt/ignite/bin/make_tape_recovery -Av 1>/tmp/test.log 2>/tmp/test.err

It is good to have log files for tracking.

--
Muthu
Easy to suggest when don't know about the problem!
Yogeeraj_1
Honored Contributor

Re: crontab configutration

hi,

make sure that your script is working in isolation also.

if you find it OK then you can include it in you crontab.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Arturo Galbiati
Esteemed Contributor

Re: crontab configutration

Hi,
look at the files:
var/adm/cron/cron.allow
to see if you are an allow user
/var/adm/cron/cron.deny
to see if you are not a deny user
/var/adm/cron/log
to see which is teh poblem of your script.

probbaly it needs a absolute path. Remeber that crontab doens't load the .rpofile for teh user.

HTH,
Art
Ajitkumar Rane
Trusted Contributor

Re: crontab configutration

Zungwon,

It is missing the absolute path as mentioned also no need of the "&" at the end. with an & i guess it wil run at a priority of 24. better put it in a script and mention the script name in the crontab, remember you need to be root to create the crontab to run that command.

Good Luck,

Ajit
Amidsts difficulties lie opportunities