Too many wp-cron requests even when disabled
The cause is that the define in wp-config.php is below the line saying /* That’s all, stop editing! Happy blogging. */ Anything defined below that is unlikely to have any impact on how wordpress works.
The cause is that the define in wp-config.php is below the line saying /* That’s all, stop editing! Happy blogging. */ Anything defined below that is unlikely to have any impact on how wordpress works.
Check the WordPress timezone setting before ripping your hair or making any big changes to files.
The .htaccess directives block any HTTP request not coming from your IP address. However, I believe WP Cron is also an HTTP request that originates from the server. So, you need to also make an exception for the server’s external IP address. These directives can also be simplified a bit… For example: RewriteCond %{REMOTE_ADDR} !=203.0.113.111 … Read more
If you’re launching wp-cron manually you don’t need the “doing_wp_cron” parameter. The fact that you have it and haven’t given it a value is very likely to be what’s causing your error.
Well, I found the answer in the actual documentation: https://developer.wordpress.org/reference/functions/wp_next_scheduled/ in form of a comment by “ub3rst4r”: Note the $args parameter! Not specifying the $args parameter in wp_next_scheduled but having $args for wp_schedule_event will cause many events to be scheduled (instead of just one). Bad Example: if ( ! wp_next_scheduled( ‘myevent’ ) ) { // … Read more
If you deactivate the plugin, the scheduled event will still try to run ( and fail ) unless you remove that event from the schedule using wp_clear_scheduled_hook
Have you ever heard of Rubber Ducking? The official documentation has an answer: if ( ! wp_next_scheduled( ‘woofio_hourly’ ) ) { wp_schedule_event( time(), ‘hourly’, ‘woofio_hourly’ ); }
I do not think it is useful to have a cron running every second, but the function itself is quite simple. You add a filter to the cron_schedules: function f711_add_seconds( $schedules ) { $schedules[‘everysecond’] = array( ‘interval’ => 1, ‘display’ => __(‘Every Second’) ); return $schedules; } add_filter( ‘cron_schedules’, ‘f711_add_seconds’ ); You can now use … Read more
Why not just to do_action($hook) of your cronned event?
Just a guess, but try to set this one in your wp-config.php // make use of redirect rather than http loopback define ( ‘ALTERNATE_WP_CRON’, true );