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 SP2
SUSE Linux Enterprise Server 12 SP5
SUSE Linux Enterprise Server 12 SP4 (LTSS)
Situation
# 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
The SLES12 SP5 and SLES15 SP3 and SP2 cron packages released September/2021 include the patch that increases the limit.
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
The maximum number allowed was set a bit too low.
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: 16-Jul-2021
- Modified Date:10-Sep-2021
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com