From 6ac0154f852a8b4637e847d9f583ed5e97c37722 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Wed, 20 May 2009 06:03:06 +0000 Subject: #375578 by Aron Novak and alex_b: Only raise max execution time during cron if too low. --- includes/common.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/common.inc b/includes/common.inc index 3b353756c..78f2fc4ae 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3032,8 +3032,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 too low. + if (ini_get('max_execution_time') < 240) { + @set_time_limit(240); + } // Fetch the cron semaphore $semaphore = variable_get('cron_semaphore', FALSE); -- cgit v1.2.3