system_cron_settings
Drupal 7 system_cron_settings()
Form builder; Cron form.
See also
Related topics
1 string reference to 'system_cron_settings'
File
- modules/
system/ system.admin.inc, line 1591 - Admin page callbacks for the system module.
Code
function system_cron_settings() {
$form['description'] = array(
'#markup' => '<p>' . t('Cron takes care of running periodic tasks like checking for updates and indexing content for search.') . '</p>',
);
$form['run'] = array(
'#type' => 'submit',
'#value' => t('Run cron'),
'#submit' => array('system_run_cron_submit'),
);
$status = '<p>' . t('Last run: %cron-last ago.', array('%cron-last' => format_interval(REQUEST_TIME - variable_get('cron_last')))) . '</p>';
$form['status'] = array(
'#markup' => $status,
);
$form['cron'] = array(
'#type' => 'fieldset',
);
$form['cron']['cron_safe_threshold'] = array(
'#type' => 'select',
'#title' => t('Run cron every'),
'#default_value' => variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD),
'#options' => array(0 => t('Never')) + drupal_map_assoc(array(3600, 10800, 21600, 43200, 86400, 604800), 'format_interval'),
);
return system_settings_form($form);
}

