Jump to content

[SOLVED] Delete error log cron job


OmerAslan

Recommended Posts

Hello,

I have error log in many folders. And i am eraseing them all the time. Is there anyway can we make some cronjob like this and erase them auto? 

Like this

mycommand >/dev/null 2>&1

Is anyone using something like this?

Edited by OmerAslan
Link to comment
Share on other sites

  • Moderators

Can you try adding the below code at the top of the file you run using cronjob?

error_reporting(0);

For your information, it should be placed within <?php and ?> tags. Alternatively, you can just try to solve the errors reported. ;)

Link to comment
Share on other sites

28 minutes ago, servetas said:

Can you try adding the below code at the top of the file you run using cronjob?


error_reporting(0);

For your information, it should be placed within <?php and ?> tags. Alternatively, you can just try to solve the errors reported. ;)

Sorry George,

I am trying to find the way to erase this error log. It has errors like this in it. I don't understand where do i have to put this code.

[08-May-2017 02:12:02 UTC] PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, class 'Schedules' does not have a method 'js' in /home/assertiveomer/public_html/aalvirtual.com/crew/core/classes/MainController.class.php on line 218
[08-May-2017 02:12:04 UTC] PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, class 'Schedules' does not have a method 'js' in /home/assertiveomer/public_html/aalvirtual.com/crew/core/classes/MainController.class.php on line 218
[08-May-2017 06:36:52 UTC] PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, class 'Schedules' does not have a method 'js' in /home/assertiveomer/public_html/aalvirtual.com/crew/core/classes/MainController.class.php on line 218

791c837b815645dc905f3f1baa84adfb.png

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...