Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

To my understanding, this is the default configuration of /etc/crontab:

# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

Why were these specific times chosen for the default entries?

At first I assumed that they are somewhat randomized on installation to even out the system load, but that doesn't seem to be correct.

share|improve this question

1 Answer 1

up vote 15 down vote accepted

Ubuntu started in 2004, and is based on Debian. By then, the current crontab was present, so we get to trace through Debian history to find its origins.

Here is the crontab from Debian 0.93R6 (November 1995). The hour is present, but the minute is different for the cron.daily entry:

# m h dom mon dow user  command
42 6    * * *   root    run-parts /etc/cron.daily
47 6    * * 7   root    run-parts /etc/cron.weekly
52 6    1 * *   root    run-parts /etc/cron.monthly

By Debian 2.1 (March 9, 2009), it changed. The cron.hourly entry isn't present yet, but the rest of the times are the same as they are currently:

25 6    * * *   root    run-parts --report /etc/cron.daily
47 6    * * 7   root    run-parts --report /etc/cron.weekly
52 6    1 * *   root    run-parts --report /etc/cron.monthly

Thankfully, Debian has changelogs, so we can see why this change was made. I've linked the bug number, which thankfully Debian keeps around:

  • Do cron.daily a little earlier, try to avoid overlap with cron.weekly (closes: Bug#23023) (from 3.0pl1-46)

Now, finding out where 6 AM and 47 and 52 came from, you'll have to follow back into pre-Debian history. I've checked the original Vixie Cron sources, and it doesn't appear to come from there.

As far as I can tell, SLS 1.03 didn't ship cron, but SLS 1.05 did. However, it doesn't appear to have come with an /etc/crontab, and the example in the manpage is different. Nor does it have a run-parts.

Looking at run-parts from Debian 0.93R6 (package miscutils), it seems its a Debian-specific tool (a short Perl script back then). So those cron lines probably originate from very early Debian development.

share|improve this answer
1  
Awesome. Thanks for your research :) –  Oliver Salzburg Jun 11 '12 at 17:26
    
I'm going to see if I can trace it further. Will edit if I find anything. –  derobert Jun 11 '12 at 17:27
1  
While digging, I could not get earlier than 26 April 1998: crontab.5 –  Lekensteyn Jun 11 '12 at 17:35
    
@Lekensteyn archive.debian.org lets you download Debian releases back to 0.93R6. –  derobert Jun 11 '12 at 17:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.