Make WordPress Core


Ignore:
Timestamp:
11/28/2013 02:35:00 AM (11 years ago)
Author:
dd32
Message:

Background Updates: Spread them over the hour. Props Pento. Merges r26149 to the 3.7 branch. Fixes #25833 for 3.7.

Location:
branches/3.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7

  • branches/3.7/src

  • branches/3.7/src/wp-includes/update.php

    r25957 r26450  
    585585        }
    586586        $next = $next - get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
     587        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
     588        $next = $next + rand( 0, 59 ) * MINUTE_IN_SECONDS;
    587589        wp_schedule_event( $next, 'twicedaily', 'wp_maybe_auto_update' );
    588590    }
Note: See TracChangeset for help on using the changeset viewer.