瀏覽代碼

cron: exit 1 on exception

Allows the caller to more easily respond to cron failures.

Signed-off-by: Stephen Michel <git@smichel.me>
tags/v23.0.0beta1
smichel17 2 年之前
父節點
當前提交
84d3a5f8e6
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      cron.php

+ 3
- 0
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);
}

Loading…
取消
儲存