• I want CPanel to run Wp CRON process .. like this:

    cd ${HOME}/public_html; wp cron event run myprefix_cron_hook >/dev/null 2>&1
    I don’t want to run the whole WP Cron, but only one specific event. But it isn’t working ! Please help me out !

Viewing 4 replies - 1 through 4 (of 4 total)
  • Specifically what is not working?

    Try outputting to a log file rather than dev null to see errors.

    Normally in cron you need to specify the path to commands e.g. /usr/bin/wp cron

    Thread Starter sandeshveerani4

    (@sandeshveerani4)

    @alanfuller Specifically CRON event isn’t running. Let me try ‘/usr/bin/wp cron’ !

    Thread Starter sandeshveerani4

    (@sandeshveerani4)

    It’s giving me this error through email !

    X-Powered-By: PHP/7.4.15
    Content-type: text/html; charset=UTF-8
    
    <br />
    <b>Warning</b>:  Use of undefined constant STDOUT - assumed 'STDOUT' (this will throw an Error in a future version of PHP) in <b>phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/utils.php</b> on line <b>1057</b><br />
    <br />
    <b>Warning</b>:  Use of undefined constant STDERR - assumed 'STDERR' (this will throw an Error in a future version of PHP) in <b>phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Regular.php</b> on line <b>50</b><br />
    <br />
    <b>Warning</b>:  fwrite() expects parameter 1 to be resource, string given in <b>phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Base.php</b> on line <b>64</b><br />

    Give webcron https://www.easycron.com a try, it’s free and does just that and more.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to run a specific WordPress CRON by CPanel CRON?’ is closed to new replies.