LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 11-04-2009, 02:50 PM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,449

Rep: Reputation: 36
crontab: minute hour or hour minute


The first two numbers in a line on a crontab are what I thought to be minutes then hour. Is there a distro/shell/anything that would ever make it hour than minutes?

Like

10 2 * * * blablabla

would run at 2:10, but is there ever a case where it would run at 10:02?
 
Old 11-04-2009, 03:04 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,485

Rep: Reputation: 2543Reputation: 2543Reputation: 2543Reputation: 2543Reputation: 2543Reputation: 2543Reputation: 2543Reputation: 2543Reputation: 2543Reputation: 2543Reputation: 2543
Quote:
Originally Posted by rjo98 View Post
The first two numbers in a line on a crontab are what I thought to be minutes then hour. Is there a distro/shell/anything that would ever make it hour than minutes?

Like

10 2 * * * blablabla

would run at 2:10, but is there ever a case where it would run at 10:02?
Yes, if you set it up to run at 10:02. There are many Google references to the crontab format in Linux. To quote one:
Quote:
The following is the format entries in a crontab must be.

MIN HOUR MDAY MON DOW COMMAND 5 * * * *

MIN = Minute 0-60
HOUR = Hour [24-hour clock] 0-23
MDAY = Day of Month 1-31
MON = Month 1-12
DOW = Day of Week 0-6
COMMAND = Command to be run
So, to run at 10:02:
Code:
02 10 * * * <command name>
They also take wildcards, such as running every 5 minutes
Code:
/5 * * * * <command name>
 
Old 11-04-2009, 03:09 PM   #3
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,449

Original Poster
Rep: Reputation: 36
OK, I more just wanted to make sure there wasn't anything out there that would make it not follow the normal minute hour.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab running twice in a minute saurabhrh Red Hat 4 01-30-2007 07:21 PM
crontab running twice in a minute saurabhrh Linux - General 1 01-30-2007 06:43 PM
crontab 24-hour time cleopard Linux - General 2 05-09-2006 07:24 AM
want to run program every minute, crontab???? poj Linux - General 4 09-19-2005 04:29 PM
change clock from 24 hour to 12 hour in suse 9.2/KDE 3.3 jmlumpkin Linux - Newbie 1 01-22-2005 11:45 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration