|This is the talk page for discussing improvements to the Cron article.|
|A Wikipedia contributor, Rlb408 (talk · contribs), may be personally or professionally connected to the subject of this article. Relevant guidelines include Wikipedia:Conflict of interest, Wikipedia:Autobiography, and Wikipedia:Neutral point of view.|
|WikiProject Computing / Software||(Rated B-class, Mid-importance)|
||This article may be too technical for most readers to understand. (September 2010)|
- 1 History
- 2 Not the crontab article
- 3 cron and DST changes
- 4 "... on a 1 MIP system ..."
- 5 Acronym
- 6 Code Examples
- 7 Merge
- 8 In "See also"...
- 9 Sketch for rework
- 10 Wikipedia is not a Unix reference manual
- 11 */31 example
- 12 CRON expressions
- 13 Acronym
- 14 Pound
- 15 Which implementations use the question mark?
I wrote this article, adapting from something written a while back, because, to me, cron is the main topic, not crontab. I am sketchy on what came before V7 and "Kernighan's cron" as we called it at Purdue and also a bit sketchy on the subsequent implementations. I hope others can round this out. I didn't really know that my cron got into "the real Unix" until I took a job at SGI in 1990 and looked at the source code and instantly recognized the awful coding style (no spaces, lots of asterisks in comments) I used as a grad student. I think Keith wrote the hardest part: figuring out the NEXT minute in the future that any particular crontab entry should be run, with out walking forward minute-by-minute asking the binary question, "now?" It took a while to debug that.
A few years back I tried to convince the Purdue Research Foundation that they should claim title to the Unix cron but we didn't save notebooks or even e-mails from those days...this was 1979!! So they chose to just let it fall by. I suspect a lot of code in Unix was written by grad students like me and Keith. Another one of those "warm up project" I designed was given to Chris Kent/Kantarjiev and the "pg" command in Unix came out of it. But everyone uses "more" now...though I believe pg was the first paginator that would allow you to go backwards, even if you piped output to it!
I apologize for any deviations from standards and style and decorum and trust the community will correct these or instruct me on how to do so...or both!
Rlb408 02:11, 9 February 2007 (UTC)
Unsure why someone added the description of the crontab fields at the top of the article. This topic is cron, not crontab. The format of cron's spec file is incidental to the topic and I think distracts. Since there is a separate article on crontab and this artile is about the history and algorithm, can we just delete the crontab format description from here? As an analogy, if there were an article about compiler optimization algorithms, would you put a description of the syntax of the language itself in that article? How very odd.
Rlb408 07:32, 17 February 2007 (UTC)
cron and DST changes
Is Vixie cron the only cron that can not tolerate changes to daylight savings time rules while running? (See http://doughboy.wordpress.com/2007/03/14/vixie-cron-and-the-new-us-dst/.) If so, maybe a note belongs there. If it affects many crons, then a note should go here.--Theodore Kloba 13:59, 26 March 2007 (UTC)
apparent crontab inconsistency
I will leave to others the editorial decision as to whether the crontab format is appropriate to include in the cron entry. However the documented range of 0-6 and the statement that either 0 or 6 conveys a Sunday for DOW (day of week) appears to be contradicted by the statement that both 0 and 7 are considered Sunday, although 7 is considered trayf* on AIX manpages.
I find it hard to believe that 0, 6 and 7 are all intended. A Unix guru might be able to verify this point in relation to difrferent Unix flavors.
What does MIP mean in the text? It's wikilink goes to a disambiguation page whose entries don't make it obvious (for me). Could someone fix the wikilink so it goes to a page describing the "MIP" being talked about? --Zabadab (Talk) @ 12:37, 27 May 2007 (UTC)
"CRON" is an acronym that stands for "Command Run ON"
That's probably not right. Sounds too much like "Unix System Resources", "Extended Tool Chest", and other such poor attempts to explain Unix terms. --188.8.131.52 14:24, 26 July 2007 (UTC)
It would be great if someone could include what different commands you can set a cron job up to. I had to spend too much time trying to figure out how to run a php script once a day...
In "See also"...
Might and Magic II: Gates to Another World, which is set in a land called Cron
Sketch for rework
Note to self or others: here is what I'd expect the article to say, if I directed one of my curious co-workers to it:
- What it is in simple terms (lets you schedule commands to run periodically, without being logged in).
- That it is enabled by default on most or all Unices.
- What system administrators use it for (backups, cleanup, indexing ...)
- What normal users use it for, and that they may not be allowed to.
- The user interface (crontab(1), the file format, and the command's output mailed to the owner).
- What the equivalent on Windows (if any) is called.
- A reference to at/atd (Oh, it's there. Good.)
- The history/algorithm stuff as-is, but not at the top of the article.
- A pronunciation guide...is it kron (like the beginning of chronological), or cr??n (as in rhymes with pawn), or something else entirely? — Preceding unsigned comment added by 184.108.40.206 (talk) 13:29, 22 December 2011 (UTC)
Wikipedia is not a Unix reference manual
Just a matter of opinion, but the value of wikipedia is that it captures material that is not collected uniformly elsewhere. Based on this thinking, I prefer that we not turn it into a Unix or Linux reference manual; that will diminish its unique value. If I want to learn how to use cron or write a crontab file, I can look it up in any of the hundreds of online reference manuals or simply type "man crontab" in a shell window.
I would like this article and others like it to tell the back story. You're not going to find this in any reference manual. The article should address questions such as
- where did this come from?
- what are its inner workings?
- what is the technical basis underlying it?
- what, if any, controversy is there?
Imaging your son or daughter or niece or nephew was to write an essay on "how did such-and-such come about" - would a reference manual page help? Not much. Similarly, I think it is important that new developers in the present day fantastic flurry of open source understand that even something as widely used as the Unix cron was started by one grad student, joined by another, in the 70's no less.
So, to me, the value of wikipedia, specifically concerning cron, is that the distinctions of the various crons are not widely known and that the Unix version is algorithmly distinct from all of the others. Do anyone care about that? Very few people, I suspect, but that applies to so many wikipedia articles.
Let's leave the reference manual content in the reference manual or some "wikiUnixReference" site.
I agree with the above user. I clicked on this link randomly from an external site, and I honestly cannot understand most of what this article is about. I have no background in Unix or programming, but I shouldn't have to in order to understand a Wikipedia page. This page needs a major overhaul.§
I'm not an expert in these things, but there is an example of */31 in the minute field. Wouldn't that run twice, since 0 mod 31 = 0 and 31 mod 31 = 0? —Preceding unsigned comment added by 220.127.116.11 (talk) 05:18, 9 August 2009 (UTC)
You can ask technical questions like this on forums. Here, we should provide a general working examples that can be reworked into a solution. Dat789 10:52, 19 February 2015 (UTC) — Preceding unsigned comment added by Dat789 (talk • contribs)
For the second time, I have removed [information] which for some reason made a sad attempt at explaining CRON expressions. Anyone reading this article could probably be assumed to be familiar with CRON expressions, but in case they weren't they, can find an more than appropriate explanation on them in the appropriate article. Unless a merge was performed and expressions were then properly covered in this article, we're better off without that info given how terribly incomplete it is. --uKER (talk) 16:47, 2 April 2010 (UTC)
- However, that article, CRON expression, describes an expression that includes seconds and year. That doesn't match the cron article. — Wdfarmer (talk) 17:51, 27 December 2010 (UTC)
The example documentation on the Quartz Scheduler site also makes use of a "seconds" field. http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html —Preceding unsigned comment added by Charlieholder (talk • contribs) 15:28, 16 May 2011 (UTC)
Is "Command Run ON" is an acronym or a fan's backronym? Lacrymocéphale 12:21, 13 October 2010 (UTC)
- I've never heard of it called that. The article has the name coming from chronos, which makes much more sense to me. me_and 12:24, 13 October 2010 (UTC)
I tested it on my ubuntu, and it fails.
24 12 * * 4#2 echo "notOK" >> /tmp/test.txt 24 12 * * 4#3 echo "OK" >> /tmp/test.txt
my /tmp/test.txt showed both "notOK" and "OK".
Which implementations use the question mark?
At the end of the overview section it says
While normally the job is executed when the time/date specification fields all match the current time and date, there is one exception: if both "day of month" and "day of week" are restricted (not "*"), then either the "day of month" field (3) or the "day of week" field (5) must match the current day.
The emphasis on "either" and "or" makes it sound like if both match it doesn't run. This doesn't seem right. That's not how it works right? I recommend this wording instead:
While normally the job is executed when the time/date specification fields all match the current time and date, there is one exception: if both "day of month" and "day of week" are restricted (not "*"), then one or both must match the current day. — Preceding unsigned comment added by 18.104.22.168 (talk) 00:18, 12 July 2013 (UTC)