function elysia_cron_ping_page in Elysia Cron 7.2
Same name and namespace in other branches
- 5.2 elysia_cron.module \elysia_cron_ping_page()
- 5 elysia_cron.module \elysia_cron_ping_page()
- 6.2 elysia_cron.module \elysia_cron_ping_page()
- 6 elysia_cron.module \elysia_cron_ping_page()
- 7 elysia_cron.module \elysia_cron_ping_page()
Page callback for ping page. Throws 404 if cron hasn't been called within configured time period.
1 string reference to 'elysia_cron_ping_page'
- elysia_cron_menu in ./
elysia_cron.module - Implements hook_menu().
File
- ./
elysia_cron.module, line 1846
Code
function elysia_cron_ping_page() {
$last_run = _ec_variable_get('elysia_cron_last_run', 0);
$diff = time() - $last_run;
$max_interval = variable_get('elysia_cron_alert_interval', 60) * 60;
if ($diff > $max_interval) {
drupal_not_found();
drupal_exit();
}
$aoutput = array();
$aoutput[] = array(
'#type' => 'markup',
'#markup' => t('Cron has been called within maximum lapse time.'),
);
return $aoutput;
}