]> 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:03:26 +0000 (21:03 +0100)
cron.php

index 0595cece4f8bfd0a0571c470ebd9b4bd80a468e9..1cde43c6b9a9e0e29f9ce8501449114fbccc1c19 100644 (file)
--- 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