Files
WordPress/wp-cron.php
T

36 lines
849 B
PHP
Raw Normal View History

2006-03-07 21:43:59 +00:00
<?php
ignore_user_abort(true);
define('DOING_CRON', TRUE);
require_once('wp-config.php');
2007-04-16 20:47:23 +00:00
if ( $_GET['check'] != wp_hash('187425') )
2006-03-08 05:51:42 +00:00
exit;
2006-11-21 02:48:12 +00:00
if ( get_option('doing_cron') > time() )
exit;
update_option('doing_cron', time() + 30);
$crons = _get_cron_array();
$keys = array_keys($crons);
if (!is_array($crons) || $keys[0] > time())
2006-03-07 21:43:59 +00:00
return;
foreach ($crons as $timestamp => $cronhooks) {
if ($timestamp > time()) break;
foreach ($cronhooks as $hook => $keys) {
foreach ($keys as $key => $args) {
$schedule = $args['schedule'];
if ($schedule != false) {
$new_args = array($timestamp, $schedule, $hook, $args['args']);
2006-09-14 00:18:05 +00:00
call_user_func_array('wp_reschedule_event', $new_args);
}
2006-09-14 00:18:05 +00:00
wp_unschedule_event($timestamp, $hook, $args['args']);
2006-11-21 02:48:12 +00:00
do_action_ref_array($hook, $args['args']);
2006-03-07 21:43:59 +00:00
}
}
}
2006-11-21 02:48:12 +00:00
update_option('doing_cron', 0);
2006-03-07 21:43:59 +00:00
?>