LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-17-2012, 11:46 PM   #1
shubhamuddu
LQ Newbie
 
Registered: Jun 2012
Posts: 24

Rep: Reputation: Disabled
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...
 
Old 08-17-2012, 11:54 PM   #2
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Hi
check out whether crond service is enabled and running !

[root@node01 ~]# service crond status
crond (pid 18896) is running...
[root@node01 ~]#
 
Old 08-18-2012, 02:05 AM   #3
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
Code:
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)
1) Make sure you list the full paths to every script/executable within your backup shell scripts.
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.
 
Old 08-18-2012, 06:11 AM   #4
shubhamuddu
LQ Newbie
 
Registered: Jun 2012
Posts: 24

Original Poster
Rep: Reputation: Disabled
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...
 
Old 08-18-2012, 08:27 AM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration