LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-01-2011, 09:54 AM   #1
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
How to run a crontab schedule hourly


crontab -e

* */1 * * * /scripts/backupscript


but my backup fall every one min how can i schedule the backup hourly ..
 
Old 12-01-2011, 09:58 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just drop a script file into /etc/cron.hourly

easiest way.
 
1 members found this post helpful.
Old 12-01-2011, 10:23 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by arun5002 View Post
crontab -e
* */1 * * * /scripts/backupscript
but my backup fall every one min how can i schedule the backup hourly ..
Read the man page/explanation on crontab, and think about the line above:
http://adminschoice.com/crontab-quick-reference

A quick Google search (something you should try, based on your other posts), would tell you how to do this, and provide lots of examples.
Code:
0 * * * * /scripts/scriptname
runs it every hour, at the top of the hour. Again, please do some basic research...all FOUR of your user ID's make posts similar to this, that can easily be solved with a basic search. You still don't post follow ups, mark threads as solved, or even say thanks...as I've asked before, why, exactly, should we keep helping you?
 
Old 12-01-2011, 10:24 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
As acid_kewpie said. Regarding your crontab entry, in addition you need to specify a minute at which the job should be scheduled, otherwise the asterisk will cause the execution at every minute of every hour. E.g. suppose you want to run the job at 8:00, 9:00, 10:00 and so on, the crontab entry should be:
Code:
0 * * * * /path/to/job
Do you want to run at 8:23, 9:23, 10:23 an so on?
Code:
23 * * * * /path/to/job
Moreover it's not necessary to specify a step equal to 1 (as in */1) since it is the default.
 
1 members found this post helpful.
Old 12-01-2011, 11:15 AM   #5
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

Rep: Reputation: Disabled
HI
TBONE In our ofice network there are around four of them every body has individual id .It doesint mean that im using of all four id .i had just helped few of my friend in posting in proper manner since they are fresher but they does int familiar with posting of question in linuxquestion.org.its doesint mean that im using all four acc.If u have four acc i could int have posted the error in my id ..
 
0 members found this post helpful.
Old 12-01-2011, 11:26 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by arun5002 View Post
HI
TBONE In our ofice network there are around four of them every body has individual id .It doesint mean that im using of all four id .i had just helped few of my friend in posting in proper manner since they are fresher but they does int familiar with posting of question in linuxquestion.org.its doesint mean that im using all four acc.If u have four acc i could int have posted the error in my id ..
Sorry, but I just don't believe you. Four people making the EXACT same spelling/grammar errors? All of you posting each others names on the posts that you make sometimes?? And if you're helping your 'friends' to "posting in proper manner", perhaps you should first start doing it. How about spelling out your words, too, as you've been asked before, and tell your 'friends' to do it as well.

And if your 'team' is in the same office, why do you respond to each others posts here, rather than answering each other in person?
http://www.linuxquestions.org/questi...-drive-904589/
http://www.linuxquestions.org/questi...-issue-892474/
http://www.linuxquestions.org/questi...t-down-891242/

..and your 'team' seems to post the same questions over and over, about the same topics. Since you're all in the same office, are you not talking to each other?

Again, you rarely (if ever), post a follow up, answer questions that are asked of you, mark posts as solved, or do any basic research before posting a question.

Last edited by TB0ne; 12-01-2011 at 11:37 AM.
 
1 members found this post helpful.
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab - schedule job to run every minute Hi_This_is_Dev Linux - General 18 04-28-2010 12:52 PM
Using crontab to schedule a script stuball Linux - Server 9 05-19-2009 07:39 AM
Hourly Crontab Setup gbkyle Linux - Newbie 2 10-06-2004 08:54 PM
schedule a crontab rupesh_pulikool Solaris / OpenSolaris 7 09-04-2004 09:32 PM
crontab schedule help onlykims Linux - Newbie 2 08-28-2004 12:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:13 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