From 75751d51de9185982f43e3d72206f1741939dfda Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 12 Mar 2024 11:01:46 +0100 Subject: fix: Call execute until it is removed for Job class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because if an application extends execute it will change behavior without warning otherwise. Signed-off-by: Côme Chilliet --- cron.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cron.php') diff --git a/cron.php b/cron.php index 6f61bb0c2a2..3efe9faf744 100644 --- a/cron.php +++ b/cron.php @@ -172,7 +172,8 @@ try { $memoryBefore = memory_get_usage(); $memoryPeakBefore = memory_get_peak_usage(); - $job->start($jobList); + /** Calling execute until it is removed, then will switch to start */ + $job->execute($jobList); $memoryAfter = memory_get_usage(); $memoryPeakAfter = memory_get_peak_usage(); @@ -207,7 +208,8 @@ try { $job = $jobList->getNext(); if ($job != null) { $logger->debug('WebCron call has selected job with ID ' . strval($job->getId()), ['app' => 'cron']); - $job->start($jobList); + /** Calling execute until it is removed, then will switch to start */ + $job->execute($jobList); $jobList->setLastJob($job); } OC_JSON::success(); -- cgit v1.2.3