Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.897
diff -u -p -r1.897 common.inc
--- includes/common.inc	9 May 2009 22:16:37 -0000	1.897
+++ includes/common.inc	11 May 2009 01:51:54 -0000
@@ -3046,8 +3046,10 @@ function drupal_cron_run() {
   // Allow execution to continue even if the request gets canceled.
   @ignore_user_abort(TRUE);
 
-  // Increase the maximum execution time.
-  @set_time_limit(240);
+  // Try to increase the maximum execution time if it is lower than 240.
+  if (ini_get('max_execution_time') < 240) {
+    @set_time_limit(240);
+  }
 
   // Fetch the cron semaphore
   $semaphore = variable_get('cron_semaphore', FALSE);
