The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Crontab empty after update

Discussion in 'General Discussion' started by Olof, Aug 2, 2016.

  1. Olof

    Olof Registered

    Joined:
    Jan 18, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. Olof

    Olof Registered

    Joined:
    Jan 18, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    stockholm, sweden
    cPanel Access Level:
    Root Administrator
    Thanks!

    But that one is completely empty (just one newline).

    WHM runs several cron jobs, are those also gone now?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  5. Olof

    Olof Registered

    Joined:
    Jan 18, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    stockholm, sweden
    cPanel Access Level:
    Root Administrator
    Thanks!

    It would be nice if it warned me, when deleting all cron jobs after updating...
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page