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.

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:
    6
    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:
    817
    Likes Received:
    22
    Trophy Points:
    18
    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
     
  3. partsace

    partsace Active Member

    Joined:
    Jan 11, 2007
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    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:
    1
    Location:
    India
    Use ESC then press shift and ":" and then hit wq enter
    The cron is ready to run as scheduled
     
  5. partsace

    partsace Active Member

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

    Thanks for the help. That worked.

    Scott
     
Loading...

Share This Page