WordPress.org

Make WordPress Core

Ticket #17462: 17462.2.diff

File 17462.2.diff, 791 bytes (added by duck_, 7 years ago)

Example patch with only cursory testing

  • wp-cron.php

     
    5353                        wp_unschedule_event($timestamp, $hook, $v['args']);
    5454
    5555                        do_action_ref_array($hook, $v['args']);
     56
     57                        if ( $local_time + 300 < time() )
     58                                break 3;
    5659                }
    5760        }
    5861}
    5962
     63delete_transient( 'doing_cron' );
     64
    6065die();
  • wp-includes/cron.php

     
    210210                $flag = 0;
    211211
    212212        // 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 ( $flag + 360 > $local_time )
    214214                return;
    215215
    216216        //sanity check