summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-05-20 06:03:06 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-05-20 06:03:06 +0000
commit6ac0154f852a8b4637e847d9f583ed5e97c37722 (patch)
treed7dc8ec638bff87659e8f31583fb85b431947287 /includes/common.inc
parente5350c1905275af6d5b9df925106cfc7a6f0b12f (diff)
downloadbrdo-6ac0154f852a8b4637e847d9f583ed5e97c37722.tar.gz
brdo-6ac0154f852a8b4637e847d9f583ed5e97c37722.tar.bz2
#375578 by Aron Novak and alex_b: Only raise max execution time during cron if too low.
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc6
1 files 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);