]> source.dussan.org Git - nextcloud-server.git/commitdiff
cron shall not operate in case we are in maintenance mode - fixes #14843
authorThomas Müller <thomas.mueller@tmit.eu>
Thu, 12 Mar 2015 20:03:26 +0000 (21:03 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Thu, 12 Mar 2015 20:08:00 +0000 (21:08 +0100)
cron.php

index 5c2cb208139b0631cbfbfe23fd886d6eaefc8755..8a3240da14bacc221367850424b98b0ebac7e304 100644 (file)
--- 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