CoreFiles by mySites.guru
wp-cron.php60 lines, 1,254 bytes, from wordpress-2.8-beta1.zip
Raw History Compare with 2.7.1-beta1
md5
e65d828eb949e2d87e12a1e0b684fcc4
sha1
8836b0e90afcdab5499a6e1c0e9209f19635a1bc
sha256
93751c311b5bf06954e1cc5b9ae84f35a2ac02f0fc8093bb40b3b01b857618b0
<?php
/**
 * WordPress Cron Implementation for hosts, which do not offer CRON or for which
 * the user has not setup a CRON job pointing to this file.
 *
 * The HTTP request to this file will not slow down the visitor who happens to
 * visit when the cron job is needed to run.
 *
 * @package WordPress
 */

ignore_user_abort(true);

if ( !empty($_POST) || defined('DOING_AJAX') || defined('DOING_CRON') )
	die();

/**
 * Tell WordPress we are doing the CRON task.
 *
 * @var bool
 */
define('DOING_CRON', true);

if ( !defined('ABSPATH') ) {
	/** Setup WordPress environment */
	require_once('./wp-load.php');
}

if ( false === $crons = _get_cron_array() )
	die();

$keys = array_keys( $crons );
$local_time = time();

if ( isset($keys[0]) && $keys[0] > $local_time )
	die();

foreach ($crons as $timestamp  => $cronhooks) {
	if ( $timestamp > $local_time )
		break;

	foreach ($cronhooks as $hook => $keys) {

		foreach ($keys as $k => $v) {

			$schedule = $v['schedule'];

			if ($schedule != false) {
				$new_args = array($timestamp, $schedule, $hook, $v['args']);
				call_user_func_array('wp_reschedule_event', $new_args);
			}

			wp_unschedule_event($timestamp, $hook, $v['args']);

 			do_action_ref_array($hook, $v['args']);
		}
	}
}

die();

The same content is in 15 releases, WordPress 2.8-beta1 to 2.8.6. See them all, or every version of this file.