Error Log and CRON Jobs [moved]

SmithJurd

Registered
Sep 19, 2006
3
0
151
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
 

mctDarren

Well-Known Member
Jan 6, 2004
665
8
168
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.
 
Last edited:

SmithJurd

Registered
Sep 19, 2006
3
0
151
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