Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Help adding a crontab

Discussion in 'General Discussion' started by partsace, Feb 8, 2008.

  1. partsace

    partsace Active Member

    Joined:
    Jan 11, 2007
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    156
    I need to add the line:

    Code:
    -rf /etc/httpd/domlogs/*ssl_data_log
    to a crontab so that it will clear once a month. The SSL data logs are killing SSL on my server. I am not new to having a server, but I am new to crontab.

    Thanks,

    Scott
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    834
    Likes Received:
    28
    Trophy Points:
    178
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    As root, type 'contrab -e' and add the command to the file:

    0 0 1 * * rm -rf /etc/httpd/domlogs/*ssl_data_log

    This will clear the files the first day of every month
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. partsace

    partsace Active Member

    Joined:
    Jan 11, 2007
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    156
    How to I save it and exit "crontab -e"? I have tried everything.

    Scott
     
  4. davidanand

    davidanand Member

    Joined:
    Jan 22, 2008
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    51
    Location:
    India
    Use ESC then press shift and ":" and then hit wq enter
    The cron is ready to run as scheduled
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. partsace

    partsace Active Member

    Joined:
    Jan 11, 2007
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    156
    Got it

    Thanks for the help. That worked.

    Scott
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice