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: v7.0.6RC1~22^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c716776a90da02e463040c507ea8a3f34d871cfd;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 5c2cb208139..8a3240da14b 100644 --- a/cron.php +++ b/cron.php @@ -50,7 +50,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