wp_schedule_update_checks

The timeline below displays how wordpress function wp_schedule_update_checks has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Schedules core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
}

WordPress Version: 4.5

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
}

WordPress Version: 4.1

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !wp_installing()) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 4.4

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !wp_installing()) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .10

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 4.3

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: 2.6

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 2.4

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .30

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 2.3

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .20

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 2.2

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .10

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 4.2

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: 1.9

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 1.5

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .40

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 1.4

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .30

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 1.3

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .20

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 1.2

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .10

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 4.1

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: 0.9

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 0.4

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .30

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 0.3

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .20

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 0.2

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .10

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 9.2

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .10

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 8.4

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .30

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 8.3

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .20

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 8.2

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .12

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 7.5

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .40

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 7.4

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .30

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 7.3

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .20

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: 7.2

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: .12

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !defined('WP_INSTALLING')) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}

WordPress Version: .10

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
        $next = $next + rand(0, 59) * MINUTE_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}

WordPress Version: 3.7

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING')) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (!wp_next_scheduled('wp_maybe_auto_update') && !defined('WP_INSTALLING')) {
        // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
        $next = strtotime('today 7am');
        $now = time();
        // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
        while ($now + 3 * HOUR_IN_SECONDS > $next) {
            $next += 12 * HOUR_IN_SECONDS;
        }
        $next = $next - get_option('gmt_offset') * HOUR_IN_SECONDS;
        wp_schedule_event($next, 'twicedaily', 'wp_maybe_auto_update');
    }
}