crontab with shell
hi all
i am using oracle enterprise linux 5.5, i tried alot to use crontab but unfortunatly did not solve my problem and also search on the net i want to run the shell script and my crontab is something like this. !/bin/sh SHELL=/bin/sh SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ HOME=/home/orale LOGNAME=oracle PATH=/usr/bin:/usr/sbin:. SHELL=/usr/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin 22 12 * * * cd /home/oracle/sh rman.sh >> /u01/rman.log plz if anyone knows about crontab so plz help me out..thanks in advance. |
i find crontab confusing too - and i am not alone.
i am sure you have done your research but you can have look at this website: http://www.notesbit.com/index.php/sc...nix-and-linux/ and consider installing something like webmin: www.webmin.com if you find these admin tasks too confusing. Nicolas |
Hi S@R@H, your post leaves a lot to be asked. For instance, what should the script accomplish? Assuming that your script, which is to be run by cron is comprehensive, my approach would be:
I think the major caveat is that you do not have command seperation. Maybe introducing a colon or preferably '&&' between the directory /home/oracle/sh and you script may help. It will also be great if you try your scripts on the commandline before adding them to cron. |
Also see http://www.adminschoice.com/crontab-quick-reference.
You can have only one active definition of a var eg SHELL, in the file. If you have more, the last/latest will be the one that takes effect. |
All times are GMT -5. The time now is 04:38 PM. |