cronjab
Hello...
I scheduled backup scripts using cronjob as below but nothing is happening, no errrors even. Please suggest what changes required..? 0 1 * * 0 /bin/sh /home/orasup/scripts/rman_weekly_full_bkp.sh (full backup every Sunday at 01:00 am) 30 2 * * 2,4,6 /bin/sh /home/orasup/scripts/rman_daily_incr_bkp.sh (Incremental level 1 backup every Tuesday, Thursday, Saturday at 01:00 am) 0 3 * * 3,5 /bin/sh /home/orasup/scripts/rman_daily_cumulative_bkp.sh(Cumulative backup every Wednesday, Friday at 01:00 am) Thanks in advance... |
Hi
check out whether crond service is enabled and running ! [root@node01 ~]# service crond status crond (pid 18896) is running... [root@node01 ~]# |
Code:
0 1 * * 0 /bin/sh /home/orasup/scripts/rman_weekly_full_bkp.sh (full backup every Sunday at 01:00 am) 2) Remove the comments like (full backup every Sunday at 01:00 am) after the script, unless they are arguments, which I don't think is the case. |
Please look at the below output, i sceduled cronjob by the user other than root user.
Should it by root user only..? If not what settings can be done at other user promp..? [root@prod ~]# service crond status crond (pid 5046) is running.... [root@prod ~]# su - orasup [orasup@prod ~]$ service crond status -bash: service: command not found [root@prod ~]# crontab -l no crontab for root [orasup@prod ~]$ crontab -l # full backup every Sunday at 01:00 am 0 1 * * 0 /bin/sh /home/orasup/scripts/rman_weekly_full_bkp.sh # Incremental level 1 backup every Tuesday, Thursday, Saturday at 01:00 am 30 2 * * 2,4,6 /bin/sh /home/orasup/scripts/rman_daily_incr_bkp.sh # Cumulative backup every Wednesday, Friday at 01:00 am 0 3 * * 3,5 /bin/sh /home/orasup/scripts/rman_daily_cumulative_bkp.sh Thanks... |
How do you know they're not running? During this kind of debugging phase you should probably be redirecting the output if each script into a log file so you can see what's happening.
Code:
0 1 * * 0 /bin/sh /home/orasup/scripts/rman_weekly_full_bkp.sh > /home/orasup/scripts/rman_weekly_full_bkp.out 2>&1 |
All times are GMT -5. The time now is 10:11 PM. |