Changeset 10474 for trunk/wp-includes/cron.php
- Timestamp:
- 01/31/2009 02:23:24 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/cron.php
r10473 r10474 181 181 return; 182 182 183 $cron_url = get_option( 'siteurl' ) . '/wp-cron.php';184 183 /* 185 184 * multiple processes on multiple web servers can run this code concurrently … … 202 201 update_option( 'doing_cron', $local_time + 30 ); 203 202 204 wp_remote_post($cron_url, array('timeout' => 0.01, 'blocking' => false));203 add_action('wp_head', 'spawn_cron_request'); 205 204 } 206 205 … … 372 371 } 373 372 373 function spawn_cron_request() { 374 374 ?> 375 <script type="text/javascript"> 376 /* <![CDATA[ */ 377 window.setTimeout(function(){var x;if(window.XMLHttpRequest){x=new XMLHttpRequest();}else{try{x=new ActiveXObject('Msxml2.XMLHTTP');}catch(e){try{x=new ActiveXObject('Microsoft.XMLHTTP');}catch(e){};}}if(x){x.open('GET','<?php echo get_option('siteurl'); ?>/wp-cron.php?'+(new Date()).getTime(), true);x.send('');}},10); 378 /* ]]> */ 379 </script> 380 <?php 381 } 382 383 ?>
Note: See TracChangeset
for help on using the changeset viewer.