From 84d3a5f8e689af0f62acc5547002863536e6a7aa Mon Sep 17 00:00:00 2001 From: smichel17 Date: Sun, 18 Jul 2021 15:06:45 +0000 Subject: [PATCH] cron: exit 1 on exception Allows the caller to more easily respond to cron failures. Signed-off-by: Stephen Michel --- cron.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cron.php b/cron.php index 815786ada53..bf35f0d2374 100644 --- a/cron.php +++ b/cron.php @@ -20,6 +20,7 @@ * @author Steffen Lindner * @author Thomas Müller * @author Vincent Petry + * @author Stephen Michel * * @license AGPL-3.0 * @@ -158,6 +159,8 @@ try { exit(); } catch (Exception $ex) { \OC::$server->getLogger()->logException($ex, ['app' => 'cron']); + exit(1); } catch (Error $ex) { \OC::$server->getLogger()->logException($ex, ['app' => 'cron']); + exit(1); }