Crontab empty after update

Olof

Member
Jan 18, 2016
11
0
1
stockholm, sweden
cPanel Access Level
Root Administrator
Recently updated to WHM 56.0 (build 29) and my root crontab is now empty.

1, Is there more than one crontab?
2, How do I get it back? (I do not update WHM/Cpanel).

cat /etc/crontab gives the following:

SHELL=/bin/bash

PATH=/sbin:/bin:/usr/sbin:/usr/bin

HOME=/


# For details see man 4 crontabs


# Example of job definition:

# .---------------- minute (0 - 59)

# | .------------- hour (0 - 23)

# | | .---------- day of month (1 - 31)

# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...

# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat

# | | | | |

# * * * * * user-name command to be executed
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

The root crontab is stored at:

Code:
/var/spool/cron/root
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

You can use the "crontab -e" command to add the entries back into the root crontab. Here are the default entries:

Code:
0 6 * * * /usr/local/cpanel/scripts/exim_tidydb > /dev/null 2>&1
30 5 * * * /usr/local/cpanel/scripts/optimize_eximstats > /dev/null 2>&1
30 23 * * * /usr/local/cpanel/scripts/upcp --cron
0 1 * * * /usr/local/cpanel/scripts/cpbackup
0 2 * * * /usr/local/cpanel/bin/backup
35 * * * * /usr/bin/test -x /usr/local/cpanel/bin/tail-check && /usr/local/cpanel/bin/tail-check
45 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_mailman_cache && /usr/local/cpanel/scripts/update_mailman_cache
30 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache
30 */2 * * * /usr/local/cpanel/bin/mysqluserstore >/dev/null 2>&1
15 */2 * * * /usr/local/cpanel/bin/dbindex >/dev/null 2>&1
15 */6 * * * /usr/local/cpanel/scripts/autorepair recoverymgmt >/dev/null 2>&1
*/5 * * * * /usr/local/cpanel/scripts/dcpumon-wrapper >/dev/null 2>&1
20 2 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
13,28,43,58 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
It would be nice if it warned me, when deleting all cron jobs after updating...
I've not seen any additional reports of the cPanel update process erasing the root crontab. Feel free to open a support ticket using the link in my signature so we can take a closer look and see if we can determine how it was erased. You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

Daniel Gheorghe

Registered
Jan 19, 2016
1
0
51
Targoviste
cPanel Access Level
Root Administrator
Hi guys,

I've had the same issue - root crontab was empty after suddenly...
Maybe you can investigate things further ?

Thanks for putting the default crontab here... I just pasted it back in for now.

Thanks,
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
I've had the same issue - root crontab was empty after suddenly...
Maybe you can investigate things further ?
Hello,

Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

loudcanvas

Registered
Nov 5, 2017
1
0
1
Somersworth NH
cPanel Access Level
Root Administrator
Same issue. All of a sudden I noticed my daily backups stopped running back around Jan 11 (this could have been SUPER bad news if a site had an issue). I checked cron and low-and-behold: ALL lines missing for some reason.

I just pasted all the correct entries back (thank you for posting them). But I am VERY concerned this is a bandaid solution. What caused them to go missing in the first place?? We never login to this box as root EVER -- so there is no chance it was human error.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello @loudcanvas,

Feel free to open a support ticket using the link in my signature if you'd like us to take a closer look to see what might have happened on your system.

Thank you.