From: Thomas Müller Date: Thu, 12 Mar 2015 20:03:26 +0000 (+0100) Subject: cron shall not operate in case we are in maintenance mode - fixes #14843 X-Git-Tag: v8.1.0alpha1~295^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e3fd13de885479b1f3a355cf4c86fbd4dd0f2495;p=nextcloud-server.git cron shall not operate in case we are in maintenance mode - fixes #14843 --- diff --git a/cron.php b/cron.php index 0595cece4f8..1cde43c6b9a 100644 --- a/cron.php +++ b/cron.php @@ -26,7 +26,11 @@ try { if (\OCP\Util::needUpgrade()) { \OCP\Util::writeLog('cron', 'Update required, skipping cron', \OCP\Util::DEBUG); - exit(); + exit; + } + if (\OC::$server->getSystemConfig()->getValue('maintenance', false)) { + \OCP\Util::writeLog('cron', 'We are in maintenance mode, skipping cron', \OCP\Util::DEBUG); + exit; } // load all apps to get all api routes properly setup