Page 1 of 1

Error.txt auto clear cronjob

Posted: Wed May 18, 2016 5:44 pm
by iamstevenelson
Hello

Can someone help me on cronjob command which deletes error.txt file located here /public_html/system/logs/error.txt everyday once.

Thank you.

Re: Error.txt auto clear cronjob

Posted: Thu May 19, 2016 5:39 am
by tabook
Perhaps my answer may seem strange, but solving the problems with the store lead the error file will be always empty?

PS:

<?php
unlink('path/to/file');

Cron:

40 5 * * * /your/command/with/php/script

Every day 5:40 AM

Re: Error.txt auto clear cronjob

Posted: Fri May 20, 2016 1:24 am
by iamstevenelson
Hi Tabook,

Thanks for your reply. I require a cronjob command which deletes error.txt file daily. This file is auto generated whenever we load the website. so deleting them is not a problem.