Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.823
diff -u -p -r1.823 common.inc
--- includes/common.inc	10 Nov 2008 05:22:59 -0000	1.823
+++ includes/common.inc	11 Nov 2008 00:00:45 -0000
@@ -2715,6 +2715,7 @@ function _drupal_bootstrap_full() {
   require_once DRUPAL_ROOT . '/includes/form.inc';
   require_once DRUPAL_ROOT . '/includes/mail.inc';
   require_once DRUPAL_ROOT . '/includes/actions.inc';
+
   // Set the Drupal custom error handler.
   set_error_handler('_drupal_error_handler');
   set_exception_handler('_drupal_exception_handler');
@@ -2728,6 +2729,14 @@ function _drupal_bootstrap_full() {
   // Load all enabled modules
   module_load_all();
 
+  // Register a safe cron run at the end of the request if needed.
+  if (variable_get('cron_run_safe', 1)) {
+    $cron_last = variable_get('cron_last', 0);
+    if (!$cron_last || (REQUEST_TIME - $cron_last > variable_get('cron_safe_threshold', 10800))) {
+      register_shutdown_function('drupal_cron_run');
+    }
+  }
+
   // Let all modules take action before menu system handles the request
   // We do not want this while running update.php.
   if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update') {
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.103
diff -u -p -r1.103 system.admin.inc
--- modules/system/system.admin.inc	10 Nov 2008 05:23:00 -0000	1.103
+++ modules/system/system.admin.inc	11 Nov 2008 00:00:13 -0000
@@ -1716,6 +1716,13 @@ function system_site_maintenance_setting
     '#description' => t('Message to show visitors when the site is in offline mode.')
   );
 
+  $form['cron_run_safe'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Automatically run cron'),
+    '#default_value' => variable_get('cron_run_safe', 1),
+    '#description' => t('Automatically run cron if it has not been run for an extended period of time.'),
+  );
+
   return system_settings_form($form);
 }
 
Index: profiles/expert/expert.profile
===================================================================
RCS file: /cvs/drupal/drupal/profiles/expert/expert.profile,v
retrieving revision 1.1
diff -u -p -r1.1 expert.profile
--- profiles/expert/expert.profile	5 Jul 2008 10:58:12 -0000	1.1
+++ profiles/expert/expert.profile	11 Nov 2008 00:02:31 -0000
@@ -90,7 +90,10 @@ function expert_profile_task_list() {
  *   modify the $task, otherwise discarded.
  */
 function expert_profile_tasks(&$task, $url) {
+  // Disable Locale module.
   module_disable(array('locale'));
+  // Disable automated cron runs.
+  variable_set('cron_run_safe', 0);
 }
 
 /**
