function _prod_check_poormanscron in Production check & Production monitor 7
File
- ./prod_check.module, line 772
Code
function _prod_check_poormanscron($caller = 'internal') {
$check = array();
$title = 'Cron';
$path = 'admin/config/system/cron';
if ($caller != 'internal') {
$path = PRODCHECK_BASEURL . $path;
}
$cron_interval = variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD);
$check['prod_check_poormanscron'] = array(
'#title' => t($title),
'#state' => $cron_interval == 0,
'#severity' => $caller == 'nagios' ? NAGIOS_STATUS_WARNING : PROD_CHECK_REQUIREMENT_WARNING,
'#value_ok' => t("Drupal's built in cron mechanism is disabled."),
'#value_nok' => t("Drupal's built in cron mechanism is set to run every %interval.", array(
'%interval' => format_interval($cron_interval),
)),
'#description_ok' => prod_check_ok_title($title, $path),
'#description_nok' => t('The !link interval should be disabled if you have also setup a crontab or scheduled task for this to avoid running the cron more often than you have planned to!', prod_check_link_array($title, $path)),
'#nagios_key' => 'CRON',
'#nagios_type' => 'state',
);
return prod_check_execute_check($check, $caller);
}