6

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.

1
  • 2
    That's crazy %) Maybe you'd better create scripts that aggregate daily/hourly/... actions?
    – kolypto
    Nov 17, 2009 at 0:56

3 Answers 3

3

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.

1

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 :)

1
  • 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 Jul 18, 2012 at 23:48
0

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.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .