Changeset 18659 for trunk/wp-includes/cron.php
- Timestamp:
- 09/09/2011 07:59:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/cron.php
r16938 r18659 205 205 * try to make this as atomic as possible by setting doing_cron switch 206 206 */ 207 $ flag= get_transient('doing_cron');208 209 if ( $ flag> $local_time + 10*60 )210 $ flag= 0;207 $lock = get_transient('doing_cron'); 208 209 if ( $lock > $local_time + 10*60 ) 210 $lock = 0; 211 211 212 212 // don't run if another process is currently running it or more than once every 60 sec. 213 if ( $ flag + 60> $local_time )213 if ( $lock + WP_CRON_LOCK_TIMEOUT > $local_time ) 214 214 return; 215 215 … … 227 227 return; 228 228 229 set_transient( 'doing_cron', $local_time ); 229 $doing_wp_cron = $local_time; 230 set_transient( 'doing_cron', $doing_wp_cron ); 230 231 231 232 ob_start(); 232 wp_redirect( add_query_arg('doing_wp_cron', '', stripslashes($_SERVER['REQUEST_URI'])) );233 wp_redirect( add_query_arg('doing_wp_cron', $doing_wp_cron, stripslashes($_SERVER['REQUEST_URI'])) ); 233 234 echo ' '; 234 235 … … 241 242 } 242 243 243 set_transient( 'doing_cron', $local_time ); 244 245 $cron_url = get_option( 'siteurl' ) . '/wp-cron.php?doing_wp_cron'; 244 $doing_wp_cron = $local_time; 245 set_transient( 'doing_cron', $doing_wp_cron ); 246 247 $cron_url = get_option( 'siteurl' ) . '/wp-cron.php?doing_wp_cron=' . $doing_wp_cron; 246 248 wp_remote_post( $cron_url, array('timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) ); 247 249 }
Note: See TracChangeset
for help on using the changeset viewer.