LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-06-2009, 07:45 PM   #1
WildDrake!
Member
 
Registered: Dec 2003
Location: Current Location: Colorado
Distribution: Ubuntu 14.10, Mint 17.1 Cinnamon and Mate
Posts: 99

Rep: Reputation: 15
crontab and the 7th day


This isn't by any means a vital question, but I just found it curious and alien to my thinking:

Concerning the crontab portion of the Rute manual, why is Sunday depicted as day 7, when the 7 day weekly cycle, starting with Sunday as the 1st day of the week and Saturday (the Old and New Testament Sabbath) as the 7th day of the week, has existed for thousands of years?
 
Old 08-06-2009, 07:56 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
Because Sunday is actually 0 or 7. Typically programmers count from 0, so the actual range is 0-6 and 7 is just 0 again.
 
Old 08-06-2009, 08:16 PM   #3
WildDrake!
Member
 
Registered: Dec 2003
Location: Current Location: Colorado
Distribution: Ubuntu 14.10, Mint 17.1 Cinnamon and Mate
Posts: 99

Original Poster
Rep: Reputation: 15
Yes. I was thinking about that starting at 0 thing that computer scientist use, but for crontab to stay consistent with this, does each month start with day 0 or (len(month)) as the first day of the month in cron? And for that matter, do the months start with month 0 and end with month 11?
 
Old 08-06-2009, 08:27 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
man crontab

It appears month and day of month do not follow that convention, but hour, minute, and day of week do. It's easy to see where starting day of month and month at 0 would be confusing for anyone who uses a western calendar. But day of week is sort of arbitrary and times follow a standard 24 hour time.
 
Old 08-06-2009, 09:09 PM   #5
WildDrake!
Member
 
Registered: Dec 2003
Location: Current Location: Colorado
Distribution: Ubuntu 14.10, Mint 17.1 Cinnamon and Mate
Posts: 99

Original Poster
Rep: Reputation: 15
Thanks. Now that I have discussed it, it surely will stick. Have a great day!
 
  


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 configuration for particular day ZAMO Linux - Server 2 12-13-2008 05:23 AM
Looking for a 7th Guest like game valkarin Linux - Games 1 03-08-2008 02:43 PM
LQ Security Report - November 7th 2004 Capt_Caveman Linux - Security 4 11-07-2004 11:00 PM
The 7th Guest (Dos Version) On Linux pcflight Linux - Games 0 10-13-2004 01:39 PM
LQ Security Report February 7th 2004 Capt_Caveman Linux - Security 2 02-07-2004 11:34 AM


All times are GMT -5. The time now is 04:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration