diff options
author | smichel17 <git@smichel.me> | 2021-07-18 15:06:45 +0000 |
---|---|---|
committer | Stephen Michel <git@smichel.me> | 2021-08-08 11:59:51 -0400 |
commit | 84d3a5f8e689af0f62acc5547002863536e6a7aa (patch) | |
tree | 8e58d99b57a40c15726735ac76c1e1b36756f8bf /cron.php | |
parent | 27847a92501d9b434589030c899bcb0561414842 (diff) | |
download | nextcloud-server-84d3a5f8e689af0f62acc5547002863536e6a7aa.tar.gz nextcloud-server-84d3a5f8e689af0f62acc5547002863536e6a7aa.zip |
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.php | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); } |