Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.895
diff -u -p -r1.895 common.inc
--- includes/common.inc	8 May 2009 22:19:04 -0000	1.895
+++ includes/common.inc	10 May 2009 14:46:57 -0000
@@ -3036,8 +3036,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);
