Support » Plugin: BackWPup - WordPress Backup Plugin » How can I disable cron output?

  • Hi there! Thanks for creating a great plugin! Each night when our backup job is kicked off by a cron job running php -q wp-cron.php we receive an email with a detailed log of the backup job. How can I disable this output? We like to get output from our cron job emailed to us so we can fix any WP bugs it surfaces. Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Daniel Hüsken

    (@danielhuesken)

    Hello Yaron,

    the output with cli usage can’t be disabled. Normally you must call wp-cron.php over a url wit curl or wget so that wordpress can retrieve it url correctly.

    Thread Starter Yaron Guez

    (@yguez)

    Hi Daniel,
    Thanks for getting back to me! I’ve always kicked off wp-cron.php using the php binary from a cron job and all the documentation I’ve seen out there recommends this approach. This approach works fine with every other plugin that only outputs warnings or errors if something goes wrong as opposed to outputting a progress report. Is there a filter I can hook into to turn this progress off? It doesn’t seem standard WordPress practice to include it in wp-cron output without such an option to disable.

    Thread Starter Yaron Guez

    (@yguez)

    I thought it might also help to clarify: I’m not using WP-CLI. The backup job is scheduled with WordPress Cron. However I have disabled the automated WordPress cron by adding
    define('DISABLE_WP_CRON', 'true');

    in my wp-config.php file. I kick of wp-cron manually with a cron job that calls:
    php -q wp-cron.php every 6 hours and emails any output to me. Typically the output is only errors that need to be corrected however each night the output includes the progress of the BackWPup plugin as well. I’d like to disable this output.

    I hope that clarifies the situation.

    Thread Starter Yaron Guez

    (@yguez)

    If it’s not possible to turn this output off, I can kick the job off manually with curl or wget. However I haven’t been able to get this working. When I call the external URL in a browser the job runs fine. When I try running curl [external_url] it doesn’t. Is there more to kicking this job off with curl then the above command?

    Plugin Author Daniel Hüsken

    (@danielhuesken)

    The Problem is BackWPup detects that you are using cli mode for PHP. In moment there is no option to disable the output on cli mode in BackWPup. you can only send the output to /dev/null,

    Thread Starter Yaron Guez

    (@yguez)

    I understand. What about my follow up question, above?
    https://wordpress.org/support/topic/how-can-i-disable-cron-output/#post-8277627

    I don’t want to output to /dev/null because I want to capture errors that occur with other plugins. I’m okay with changing the backup to an external URL and creating another cron job that runs it with curl [external_url] but, for some reason, this doesn’t work. It does work if I go the external URL in a browser. Am I using curl incorrectly here?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How can I disable cron output?’ is closed to new replies.