Solution
Function Bing_cron_request ($ request ){
$ Request ['args '] ['timeout'] = 2; // change the size of 2 if it cannot be released.
Return $ request;
}
Add_filter ('cron _ request', 'Bing _ cron_request ');
Solution 1
Modify the/wp-nodes des/cron. php system file
Open the cron. Php file under the wp-Des directory and find the "timeout" code:
Wp_remote_post ($ cron_url, array ('timeout' => 0.01, 'blocking' => false, 'sslverify '=> apply_filters ('https _ local_ssl_verify', true )));
You can change the value 0.01 after the code to a value greater than 0.01 or 10.00.
This method is not highly recommended because after the WordPress version is updated, you need to modify the file again.
Solution 2
Use WP Missed Schedule plug-in
Download WP Missed Schedule and install and enable it. If you do not want to install the plug-in, you can directly add the code of the plug-in to the end of functions. php:
<? Php
If (! Function_exists ('add _ action ')){
Header ('status 403 Forbidden '); header ('http/1.0 403 Forbidden'); header ('http/1.1 403 Forbidden '); exit ();}
?>
<? Php
Function wpms_log (){
Echo "\ n <! -- Plugin WP Missed Schedule 2011.0900002011 Active --> ";
}
Add_action ('WP _ head', 'wpms _ log ');
Add_action ('WP _ footer ', 'wpms _ log ')
?>
<? Php
Define ('wpms _ delay', 5 );
Define ('wpms _ option', 'WP _ missed_schedule ');
Function wpms_replace (){
Delete_option (WPMS_OPTION );
}
Register_deactivation_hook (_ FILE __, 'wpms _ replace ');
Function wpms_init (){
Remove_action ('Publish _ future_post ', 'Check _ and_publish_future_post ');
$ Last = get_option (WPMS_OPTION, false );
If ($ last! = False) & ($ last> (time ()-(WPMS_DELAY * 60) return;
Update_option (WPMS_OPTION, time ());
Global $ wpdb;
$ ScheduledIDs = $ wpdb-> get_col ("SELECT 'id' FROM '{$ wpdb-> posts }'". "WHERE (". "('post _ date'> 0) & ('post _ date' <= CURRENT_TIMESTAMP () OR ". "('post _ date_gmt'> 0) & ('post _ date_gmt' <= UTC_TIMESTAMP ()))". ") AND 'Post _ status' = 'futuristic 'LIMIT ");
If (! Count ($ scheduledIDs) return;
Foreach ($ scheduledIDs as $ scheduledID) {if (! $ ScheduledID) continue;
Wp_publish_post ($ scheduledID );}
}
Add_action ('init ', 'wpms _ init', 0)
?>