Merge pull request #28348 from smichel17/patch-1

cron: exit 1 on exception
This commit is contained in:
szaimen 2021-08-10 15:01:52 +02:00 committed by GitHub
commit a6ab0e188d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}