WordPress Multisite Cron Issue
WordPress Multisite Cron Issue
WordPress Multisite Cron Issue
As you mentioned, WordPress by default only runs the wp_cron when the WordPress site is visited. This of course will cause problems if you are needing to schedule some event reliably, and you aren’t getting consistent traffic to your site. To resolve this, you can disable the default functionality of the wordpress cron by adding … Read more
I would suggest looking at using transients for your data. Using transients would also take care of needing to use cron to update the data. Transients are an under utilised function of WordPress and can save considerable loads on resources as sites get busier. Vee
Apparently, WP-Cron jobs are run in a separate process. This can raise some issues, but at least the answer to the question above is: yes, a time-consuming action can be scheduled with WP-Cron. The triggering HTTP request won’t be delayed because of it.
First you can to create a schedule for one minute, then bind function with that hook. function add_new_intervals($schedules) { // add weekly and monthly intervals $schedules[‘every_single_minutes’] = array( ‘interval’ => 60, ‘display’ => __(‘Every Minute’) ); return $schedules; } add_filter( ‘cron_schedules’, ‘add_new_intervals’); // To schedule event for this minute event wp_schedule_event( current_time( ‘timestamp’ ), ‘every_single_minutes’, … Read more
The code to schedule a cron event takes a timestamp as the first parameter. As long as you set the original timestamp to be 9:00 (on any day) the twicedaily trigger should take care of the rest wp_schedule_event( $timestamp, $recurrence, $hook, $args )
This could be caused by many different things, as well as a result of a broken cron setup, where actions are being scheduled, but never run. The best way forward is to try and understand what is actually being scheduled or rescheduled, what are the action names? If you can find the action names, you’ll … Read more
Disabled all plugins and re-enabled only the necessary ones for this plugin to run correctly (a custom-post-types & custom-taxonomies plugin). Re-activated the plugin and got the error message but with a detail that the line 128 had a semicolon in it. As this was a function being called to get the ID of the element … Read more
In short, yes. When wp-cron is not triggered frequently enough it will miss scheduled publish times. The behavior you mentioned above is normal. A visit to your site will automatically trigger wp-cron in the background and any “Missed Schedule” posts will be published promptly. To get more consistent behavior from wp-cron I’d recommend setting up … Read more
You should open a support ticket with your host, as it’s probably related to their environment. From the error, it sounds to me like they might be blocking curl in their environment, probably for security reasons. They may be able to unblock it, or you may need to find an alternative.