What is the origin of "cron"? The casual observer might think it derives from "chronological" but even systems programmers can spell better than that. My man pages simply call it "clock daemon". This must be an acronym or abbreviation for something--anybody know for sure? Please check speculation at the door, I want the straight dope.

Telemark

11-06-2001, 11:04 AM

Since "biff" came from the name of a dog who barked at the mailman, I think it may be hoping too much for a clearcut logical origin for "cron".

Dennis Richie (co-creator of Unix and C) was once asked if he could go back and make any change, what would it be. He said he'd spell "creat" with a trailing 'e'.

Flymaster

11-06-2001, 11:11 AM

Originally posted by CookingWithGas
The casual observer might think it derives from "chronological" but even systems programmers can spell better than that.
I think you're making quite the leap of faith, there. I'd bet a fair sum of money that it's just from chronograph.

Terminus Est

11-06-2001, 11:11 AM

I always assumed that, since cron runs programs at a scheduled time, it had something to do with Chronos. I can't find anything definitive about it on the web.

Telemark

11-06-2001, 11:13 AM

He probably also would have spelled "Ritchie" with a 't'.

http://www.cs.bell-labs.com/who/dmr/

micco

11-06-2001, 11:55 AM

Originally posted by CookingWithGas
What is the origin of "cron"? The casual observer might think it derives from "chronological" but even systems programmers can spell better than that.

Thanks to the HTTP protocol, we now have an entire group of people who spell referrer incorrectly. If we can drop an "r" from referrer, we can drop an "h" from chron. At least it's better than MS where the equivalent service is "at".

Chronos

11-06-2001, 11:51 PM

I always assumed that, since cron runs programs at a scheduled time, it had something to do with Chronos. I can't find anything definitive about it on the web.Hey, don't blame me, I know how to speel. 'Sides, I wasn't even born then :).

FyreFiend

11-07-2001, 02:21 AM

Originally posted by micco
...At least it's better than MS where the equivalent service is "at".
Actually Linux (and I think NetBSD) have 'at' as well. Never use it myself so though.

micco

11-07-2001, 08:42 AM

Originally posted by FyreFiend
Actually Linux (and I think NetBSD) have 'at' as well. Never use it myself so though.

Linux also has crontab, which is more analogous to the Unix cron and MS at. Linux's at is run-once. In any case, I wasn't commenting about the functionality, just the word. It's easier to make an unambiguous sentence with cron regardless of spelling. You can get into a real "who's on first" converstation telling an MS admin to set up an at job.

Arnold Winkelried

11-07-2001, 09:58 AM

micco: crontab is the program that shows you what's in the scheduling file used by the cron background process.

micco

11-07-2001, 10:15 AM

Originally posted by Arnold Winkelried
micco: crontab is the program that shows you what's in the scheduling file used by the cron background process.

It's also used to set up the schedule file used by the cron daemon. crontab -e (e as in edit) is the functional equivalent of the Windows NT at command.

Zyada

11-07-2001, 10:45 AM

Actually, most versions of Unix have at and cron, with crontab being the user interface to cron, which runs as a daemon. at is the quick and dirty one-shot.

Sadly, the really good Unix FAQ doesn't cover this.

This page (http://www.roesler-ac.de/wolfram/acro/all.htm) shows the source as the greek god Chronos and khronos is the greek word for time. This shows up in our language as the prefix chrono- which indicates time.

This page (http://www3.sympatico.ca/untangle/greek.html) shows that Chronos has Cronus and Cronos as alternate spellings. The two dictionaries I checked refer to this god as "Cronus", so I suspect that this is the normal spelling for the god's name.

If it came from an english word, I'd go for chronology("arrangement of events in time") over chronograph("an instrument to record events over time")

In the end, most unix commands are designed for the least amount of typing possible, so dropping a silent "h" is completely in character for this system.

yabob

11-07-2001, 07:50 PM

Originally posted by Zyada

In the end, most unix commands are designed for the least amount of typing possible, so dropping a silent "h" is completely in character for this system.

In the early days, it was sort of considered "stylish" to create a two-letter, or at most three-letter command.

Another good example of the sort of thinking that went into creating command names - "cat" from "concatenate". "awk" came from the initials of the creators (Aho, Kernighan and somebody else - Winograd?). "grep" was at least an acronym - it came from "Generalized Regular Expression Parser", and rapidly became a verb ("Reach out and GREP someone" was a bumper sticker at some point).

Long names were permissable if the command wound up sounding vaguely obscene, as in "finger", which took users for arguments.

And yes, "at" was a common UNIX utility long before the existance of MS. The distinction between it and crontab was
that "at jobs" were intended for one shot execution at some later time. But many people who did not understand crontab, or have appropriate privileges before there was support for crontab entries for each user, discovered "at", and would submit "at" jobs which rescheduled themselves as the last step.

Actually, what were the filename length limits on the really early UNIX flavors? I only go back as far as System III, which had a 14 char limit, which remained the limit on Sys V.

Derleth

11-07-2001, 08:59 PM

Originally posted by yabob
"grep" was at least an acronym - it came from "Generalized Regular Expression Parser", and rapidly became a verb ("Reach out and GREP someone" was a bumper sticker at some point).

Nope. 'grep' comes from the ed (editor, because it was once the standard text editor) command 'g/re/p', which means globally search for this regular expression and print the lines it occurs on. Lines? Yes, because ed is a line editor. It was used in the days of line printers, when text was it and even that was scarce. Hence its rather terse command structure and its even terser error message: ?

Oh, and for the record, parsing involves processing input according to rules. grep doesn't parse anything, it just searches for regular expressions.

Regular expressions, in case anyone is wondering, are wild card patterns used by some (well, most Unix-centric text editing) programs to find text. They are powerful and terse, making them somewhat cryptic until you get used to them. Actually, that true for a lot of Unix.

Originally posted by yabob
"awk" came from the initials of the creators (Aho, Kernighan and somebody else - Winograd?).

Alfred V. Aho, Peter J. Weinberger, Brian W. Kernighan.

Mr2001

11-08-2001, 01:01 AM

Originally posted by Derleth
Nope. 'grep' comes from the ed (editor, because it was once the standard text editor) command 'g/re/p', which means globally search for this regular expression and print the lines it occurs on.

The syntax is g/(insert regexp here)/p; "g/re/p" is never actually typed. I've seen that explanation but it's always seemed like a big stretch.

Zyada

11-08-2001, 12:25 PM

Not a stretch at all. In the documentation, "regular expression" would be abbreviated re, so the command would show in the documentation as g/re/p. And you can use this command in vi.

Or you could think of the command as global regular expression print.

Derleth

11-08-2001, 06:33 PM

Originally posted by Mr2001
Originally posted by Derleth
Nope. 'grep' comes from the ed (editor, because it was once the standard text editor) command 'g/re/p', which means globally search for this regular expression and print the lines it occurs on.

The syntax is g/(insert regexp here)/p; "g/re/p" is never actually typed. I've seen that explanation but it's always seemed like a big stretch.

Well, if you wanted the regular expression 're', that's what you would type.

:D

And besides, it isn't a stretch at all, seeing as how it's an actual command.

Apollyon

11-08-2001, 07:25 PM

Originally posted by Zyada
Or you could think of the command as global regular expression print.
Dat's what my unix text says it stands for. Unix for the Impatient: "The name grep stands for "Global Regular Expression Print".

Great book BTW. Have to respect a handbook that uses as an example: egrep 'idol|adultery' KingJames :)