Ticket #6966: cron-ignore-duplicate-events-r7916.3.patch
File cron-ignore-duplicate-events-r7916.3.patch, 621 bytes (added by , 17 years ago) |
---|
-
wp-includes/cron.php
1 1 <?php 2 2 3 3 function wp_schedule_single_event( $timestamp, $hook, $args = array()) { 4 // don't schedule a duplicate if there's already an identical event due in the next 10 minutes 5 $next = wp_next_scheduled($hook, $args); 6 if ( $next && $next <= $timestamp + 600 ) 7 return; 8 4 9 $crons = _get_cron_array(); 5 10 $key = md5(serialize($args)); 6 11 $crons[$timestamp][$hook][$key] = array( 'schedule' => false, 'args' => $args );