Tag Info

New answers tagged

0

...if you have low traffic on your site it may never run due to the way how WP Cron works In your particular example it should always fire. Since save_post runs just before a browser redirect, the subsequent request back to the edit screen will fire the cron schedule. ...won't that delay the page rendering the next time WP Cron is triggered by a ...


1

Note on input arguments: You are using the filter callback function (FCB) with two input arguments, but the default is one. In general you should replace: add_filter( 'some_filter', 'some_filter_callback' ); function some_filter_callback( $arg1, $arg2 ) { with something like: add_filter( 'some_filter', 'some_filter_callback', 10, 2 ); function ...


0

Unfortunately the WordPress cron jobs are only triggered when your site is visited This is true. The only way to reliably execute code (even if visitors don't visit your site) is to use the unix cron functions. You can just setup a unix cron job that will do a wget on your homepage. Edit: You can read this article to figure out how to setup unix ...



Top 50 recent answers are included