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.

Error Log and CRON Jobs [moved]

Discussion in 'General Discussion' started by SmithJurd, Sep 19, 2006.

  1. SmithJurd

    SmithJurd Registered

    Joined:
    Sep 19, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    HI,

    I really need to know how to setup a CRON job to delete my error log at the end of every week... it gets kinda big and until I can fix all the reasons the errors pop up I need to be able to delete it.

    Im using PHP and have never created a CRON job before... can anyone help?

    Many Thanks
     
  2. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    Do a Google search on "logrotate". You could add it to the rotatation so it will rotate as it reaches a certain size.

    edit: just occured to me you might not have root access. If that's the case, do you know if your host blocks php exec commands or file access through php? Might be hard if you can't execute those in your script.
     
    #2 mctDarren, Sep 19, 2006
    Last edited: Sep 19, 2006
  3. SmithJurd

    SmithJurd Registered

    Joined:
    Sep 19, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thanks muchly mate, its ok since its a dedi server so I have full access :)

    Ill give that a try and see how I go

    And thanks again
     
  4. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
Loading...

Share This Page