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 -e error

Discussion in 'Workarounds and Optimization' started by 0101, Jun 14, 2010.

  1. 0101

    0101 Active Member

    Joined:
    Apr 2, 2010
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Hi
    I have a problem when you type the following crontab -e
    There is no any instruction within the file
    With the knowledge that I have you set up the timing of annotating and backing up and updating cpanel
    Is there any way to retrieve the default values and that you modify them
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    crontab -e invokes a text editor

    If you are logged in as root, then "crontab -e" without any other arguments will open root's crontab in a text editor, normally either vi or nano. Once the file is open in an editor, you will see something like this:

    Code:
    9,24,39,54 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
    25 0 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
    */5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1
    2,58 * * * * /usr/local/bandmin/bandmin
    0 0 * * * /usr/local/bandmin/ipaddrmap
    6 12 * * * cd /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/scripts/ ; /usr/local/cpanel/3rdparty/bin/php cron.php > /dev/null 2>&1
    30 */4 * * * /usr/bin/test -x /scripts/update_db_cache && /scripts/update_db_cache
    45 */8 * * * /usr/bin/test -x /usr/local/cpanel/bin/optimizefs && /usr/local/cpanel/bin/optimizefs
    0 5 * * * /usr/bin/freshclam --quiet --no-warnings
    0 6 * * * /scripts/exim_tidydb > /dev/null 2>&1
    52 21 * * * /scripts/upcp
    0 1 * * * /scripts/cpbackup
    35 * * * * /usr/bin/test -x /usr/local/cpanel/bin/tail-check && /usr/local/cpanel/bin/tail-check
    You will need to be familiar with the crontab format in order to edit it successfully. It is a bit complex to describe here, so please consult the crontab documentation. You can either type "man crontab" at the shell command prompt, or there are a very large number of tutorials available online. Here are a few that I was able to find quickly using a search engine:

    Crontab – Quick Reference
    CRONTAB Tutorial | LinuxWebLog.com
    Crontab Tutorial (Cron Tutorial) - Online Training and Tutorials

    The particular entries that affect cPanel updates and backup runs are the following:

    Code:
    52 21 * * * /scripts/upcp
    0 1 * * * /scripts/cpbackup
    /scripts/upcp is the cPanel update process, and in this example it is set to run at 21:52 (10:52 PM) every night. /scripts/cpbackup is the cPanel backup process, and in this example it is set to run at 01:00 (1:00 AM) every morning.

    Once you have edited the crontab, save the changes and exit the editor, and the new crontab will immediately take effect. There is no normally no need to restart cron or any other service.
     
Loading...

Share This Page