system_cron_settings

7 system.admin.inc system_cron_settings()
8 system.admin.inc system_cron_settings()

Return the cron status and errors for admin/settings.

1 call to system_cron_settings()

File

modules/system.module, line 514
Configuration system that lets administrators modify the workings of the site.

Code

function system_cron_settings() {
  $cron_last = variable_get('cron_last', NULL);

  if (is_numeric($cron_last)) {
    $status = t('Cron is running. The last cron job ran %time ago.', array('%time' => format_interval(time() - $cron_last)));
  }
  else {
    $status = t('Cron has not run. It appears cron jobs have not been setup on your system. Please check the help pages for <a href="%url">configuring cron jobs</a>.', array('%url' => 'http://drupal.org/cron'));
  }

  $form['settings'] = array(
    '#type' => 'item',
    '#value' => $status,
  );
  return $form;
}
Login or register to post comments