]> git.mxchange.org Git - friendica.git/commitdiff
Cron/Queue: Setting a limit to avoid endless PHP jobs.
authorMichael Vogel <icarus@dabo.de>
Wed, 21 May 2014 05:28:33 +0000 (07:28 +0200)
committerMichael Vogel <icarus@dabo.de>
Wed, 21 May 2014 05:28:33 +0000 (07:28 +0200)
include/cronhooks.php
include/queue.php

index cf1d13765faf56d8d55b49bc5d6796cc677ede02..d5daf0d7d447a2beb4bb7a769872dd3b410b6dbf 100644 (file)
@@ -50,11 +50,14 @@ function cronhooks_run(&$argv, &$argc){
 
        logger('cronhooks: start');
 
-
        $d = datetime_convert();
 
+       set_time_limit(9*60*60); // Setting the maximum execution time for cronjobs to 9 minutes.
+
        call_hooks('cron', $d);
 
+       logger('cronhooks: end');
+
        return;
 }
 
index 4825eb8a4d4cb0524e5e637804fe37d5f01ea566..7fb6c6d90a7f553ad593bd85e04f125b934b69e1 100644 (file)
@@ -106,6 +106,8 @@ function queue_run(&$argv, &$argc){
 
        logger('queue: start');
 
+       set_time_limit(9*60*60); // Setting the maximum execution time for queue job to 9 minutes.
+
        handle_pubsubhubbub();
 
        $interval = ((get_config('system','delivery_interval') === false) ? 2 : intval(get_config('system','delivery_interval')));