Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.85
diff -u -F^f -r1.85 install.php
--- install.php	31 Oct 2007 16:14:15 -0000	1.85
+++ install.php	1 Nov 2007 22:16:08 -0000
@@ -998,6 +998,9 @@ function install_configure_form_submit($
   // would be required later in the request, so remember it.
   $user->sid = session_id();
 
+  // Record when this install ran.
+  variable_set('install_time', time());
+
   $form_state['redirect'] = 'finished';
 }
 
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.167
diff -u -F^f -r1.167 system.install
--- modules/system/system.install	25 Oct 2007 20:41:16 -0000	1.167
+++ modules/system/system.install	1 Nov 2007 22:16:10 -0000
@@ -89,21 +89,77 @@ function system_requirements($phase) {
     $requirements['settings.php']['title'] = $t('Configuration file');
   }
 
-  // Report cron status
+  // Report cron status.
+  //
+  // The general idea is that cron not having run recently is okay
+  // until cron_threshold_warning, a warning until
+  // cron_threshold_error, and an error after that.  For a newly
+  // installed system where cron has not run, system install time is
+  // used as the start time from which to measure the thresholds.
+  //
+  // Also, if cron has never run, a friendly reminder is displayed on
+  // the Administer page until it becomes an error condition.
+  // Previously, new users saw a "cron never run" error condition
+  // immediately upon installation
   if ($phase == 'runtime') {
+    // Cron warning threshold default is two days.
+    $threshold_warning = variable_get('cron_threshold_warning', 172800);
+    // Cron error threshold default is seven days.
+    $threshold_error = variable_get('cron_threshold_error', 691200);
+    // This is used in a few places below.
+    $help = $t('Please check the help pages for <a href="@url">configuring cron jobs</a>.', array('@url' => 'http://drupal.org/cron'));
+    
+    // Determine when cron last ran.  If never, pretend like it ran at
+    // install time since that's when we measure from for warnings/errors.
     $cron_last = variable_get('cron_last', NULL);
-
-    if (is_numeric($cron_last)) {
-      $requirements['cron']['value'] = $t('Last run !time ago', array('!time' => format_interval(time() - $cron_last)));
+    $never_run = FALSE;
+    if (!isset($cron_last) || !is_numeric($cron_last)) {
+      $never_run = TRUE;
+      $cron_last = variable_get('install_time', 0);
+    }
+
+    // Severity depends on how long it has been since cron ran.
+    $severity = REQUIREMENT_OK;
+    if (time() - $cron_last > $threshold_error) {
+      $severity = REQUIREMENT_ERROR;
+    }
+    else if (time() - $cron_last > $threshold_warning) {
+      $severity = REQUIREMENT_WARNING;
+    }
+    
+    // If cron hasn't been run, the user is viewing the main
+    // Administer page, and we are not causing an error to be
+    // displayed, display a helpful reminder about setting up cron.
+    if ($never_run && $severity != REQUIREMENT_ERROR && $_GET['q'] == 'admin') {
+      drupal_set_message($t('Cron has not run.') .' '. $help);
+    }
+
+    // Set summary and description based on values computed above.
+    $description = '';
+    if ($never_run) {
+      $summary = $t('Never run');
+      $description .= $t('Cron has not run.');
+      if ($severity != REQUIREMENT_ERROR) {
+        $description .= ' '. $t('This will become an error condition in !time.', array('!time' => format_interval($cron_last + $threshold_error - time())));
+      }
+      $description .= ' '. $help;
     }
     else {
-      $requirements['cron'] = array(
-        'description' => $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')),
-        'severity' => REQUIREMENT_ERROR,
-        'value' => $t('Never run'),
-      );
+      $summary = $t('Last run !time ago', array('!time' => format_interval(time() - $cron_last)));
+      if ($severity != REQUIREMENT_OK) {
+        $description .= ' '. $t('Cron has not run recently.');
+        if ($severity != REQUIREMENT_ERROR) {
+          $description .= ' '. $t('This will become an error condition in !time.', array('!time' => format_interval($cron_last + $threshold_error - time())));
+        }
+        $description .= ' '. $help;
+      }
     }
-    $requirements['cron'] += array('description' => '');
+
+    $requirements['cron'] = array(
+      'severity' => $severity,
+      'value' => $summary,
+      'description' => $description,
+      );
 
     $requirements['cron']['description'] .= ' '. $t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/reports/status/run-cron')));
 
