From 65b54d30d120cd0739df9a90fb3ecd4abd1263dd Mon Sep 17 00:00:00 2001 From: valentina Date: Thu, 3 Oct 2024 16:11:36 +0200 Subject: [PATCH] Aggiunta impostazione limite di tempo esecuzione cron.php da config --- config.example.php | 3 +++ cron.php | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config.example.php b/config.example.php index 863e6d9a5..2c6c619bf 100755 --- a/config.example.php +++ b/config.example.php @@ -74,3 +74,6 @@ $assets = [ 'print' => [], 'js' => [], ]; + +// Configura il limite di tempo di esecuzione del file cron.php +$time_limit = ''; \ No newline at end of file diff --git a/cron.php b/cron.php index 25b8d9c82..2a00f40d4 100644 --- a/cron.php +++ b/cron.php @@ -33,7 +33,12 @@ use Monolog\Logger; use Tasks\Task; // Rimozione delle limitazioni sull'esecuzione -set_time_limit(0); +if ($config['time_limit']) { + $time_limit = $config['time_limit']; +} else { + $time_limit = 86400; +} +set_time_limit($time_limit); ignore_user_abort(true); // Chiusura della richiesta alla pagina