davood said:Hi there,
i am curious to know if anyone knows of a cron job command i can use to have my error log cleared out every so often...
any help would me much appreciated... thanks in advance.
-Davood
ok... well what i am asking for is the command i have to enter into cron tab.. the last link you provided is telling me to edit files...sawbuck said:Must be missing your intent as logrotate runs as a daily cronjob.
thanks.. but for some reason mine does not rotate until there have been 500 errors... and all that happends is on the 501st it simply pushes the oldest one out...chirpy said:The link that sawbuck gave to you details all you need to do to have your logs rotated. There's an application that runs on your server called logrotate exactly for that function which already runs in cron every day or week, depending on your server setup. Adding an additional crontab to run it separately won't make much difference for that reason and is probably a bad idea as it defeats the object of running logrotate in the first place.
This will automatically empty your error_log file every day at 1 o'clock.* 1 * * * cp /dev/null /home/davood/public_html/error_log
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
B | Error: You must specify a subdomain. | Domain Management | 1 | |
![]() |
raw error logs for domains. | Domain Management | 4 | |
D | error logs for cron | Domain Management | 2 | |
W | /scripts/runlogsnow cron error | Domain Management | 14 | |
W | 2 domains + logs + errors | Domain Management | 0 |