Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a limit to the number of entries in a user's crontab? I have a personal crontab with ~100 entries, and I just added a job to it that does not appear to be running. I can see in syslog when cron launches all the other jobs, but not this last one.

This is ubuntu's default vixie cron.

share|improve this question
2  
That's crazy %) Maybe you'd better create scripts that aggregate daily/hourly/... actions? –  kolypto Nov 17 '09 at 0:56

3 Answers 3

up vote 2 down vote accepted

There doesn't appear to be a documented limit to the number of crontab entries allowed. So, short of checking the source code to the specific version you're using, perhaps the BUG entry in the crontab manpage could be helpful:

Although cron requires that each entry in a crontab end in a newline character, neither the crontab command nor the cron daemon will detect this error. Instead, the crontab will appear to load normally. However, the command will never run. The best choice is to ensure that your crontab has a blank line at the end.

share|improve this answer

Recent (2011) Ubuntu Debian is limited to 256 (and I just ran into that). FreeBSD will happily accept 600 entries. I haven't checked beyond that, but 600 crontab entries ought to be enough for anyone :)

share|improve this answer
    
Doesn't this depend on the crontab daemon? I just checked the source code for cron on debian and it seems to use an ulimited linked list for reading and storing the jobs, e.g. there is no limit –  Ulrich Dangel Jul 18 '12 at 23:48

It Depends (tm)

You don't say what operating system or what version of cron you're using so its hard to know for sure.

Did you check "man cron" or "man crond"?

I believe that with some, there is a limit of 256 entries.

A quick test on Solaris suggests that a user is limited to 100 lines (but all entries continue to show up in 'crontab -l').

Why are you asking what the limit is? Starting all of those processes automatically at the same time sounds like potential trouble. :-)

To keep my own sanity I prefer to create cron scripts called Hourly, Daily, Weekly, Monthly. etc.

This allows me to group commands and make sure everything doesn't fire at once.

Depending on your needs, this might be a good solution for you as well.

share|improve this answer
    
He said "ubuntu". –  Dennis Williamson Nov 16 '09 at 23:34
1  
By the way, your answer is almost verbatim of post #7 here: archives.devshed.com/forums/unix-linux-135/… –  Dennis Williamson Nov 16 '09 at 23:39

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.