Make WordPress Core


Ignore:
Timestamp:
11/14/2013 04:03:27 AM (10 years ago)
Author:
dd32
Message:

Background Updates: Spread them over the hour. Props Pento. Fixes #25833 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r26081 r26149  
    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.