crontab - More than 1000 entries in crontab file, can't install

This document (000020338) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12 SP5
SUSE Linux Enterprise Server 12 SP4 (LTSS)

Situation

After 1000 entries/lines in a crontab file the next attempt to edit and add a new line results in the following error:

# crontab -e
crontab: installing new crontab
More than 1000 entries in crontab file, can't install.
Do you want to retry the same edit?

# crontab -u root /root/1005cron_entries_file
More than 1000 entries in crontab file, can't install.


Attempting to manually install a user crontab with cp /root/1005cron_entries_file /var/spool/cron/tabs/root results in system log errors.

2021-07-21T05:10:01.190514-06:00 sles15sp3 cron[1619]: (CRON) too many entries (/var/spool/cron/tabs/root) 2021-07-21T05:10:01.190637-06:00 sles15sp3 cron[1619]: (root) FAILED (loading cron table)

One of the following cronie RPM package versions has been installed.

SLES12 cronie-1.4.11-59.13.1
SLES15 cronie-1.5.1-6.12.2

Resolution

Some applications need to create more than 1000 entries to a crontab, so the maximum will be increased.
A PTF has been created by engineering.

Work Around
To work around the issue, create your user crontab file in /etc/cron.d. For example,
# cat /etc/cron.d/bigcron
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/bin:/usr/sbin

0 0 * * * root echo 1
0 0 * * * root echo 2
0 0 * * * root echo 3
0 0 * * * root echo 4
...
0 0 * * * root echo 1002
0 0 * * * root echo 1003
0 0 * * * root echo 1004
0 0 * * * root echo 1005

 

Cause

Due to security reasons the number of entries in the crontab file needed to be limited to 1000 entries.
The maximum number allowed was set a bit too low.

Status

Reported to Engineering

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020338
  • Creation Date: 21-Jul-2021
  • Modified Date:21-Jul-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center