Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmichel17 <git@smichel.me>2021-07-18 18:06:45 +0300
committerStephen Michel <git@smichel.me>2021-08-08 18:59:51 +0300
commit84d3a5f8e689af0f62acc5547002863536e6a7aa (patch)
tree8e58d99b57a40c15726735ac76c1e1b36756f8bf /cron.php
parent27847a92501d9b434589030c899bcb0561414842 (diff)
cron: exit 1 on exception
Allows the caller to more easily respond to cron failures. Signed-off-by: Stephen Michel <git@smichel.me>
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php3
1 files changed, 3 insertions, 0 deletions
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 <mail@steffen-lindner.de>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Vincent Petry <vincent@nextcloud.com>
+ * @author Stephen Michel <git@smichel.me>
*
* @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);
}