summaryrefslogtreecommitdiffstats
path: root/cron.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-12 21:03:26 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-03-12 21:03:26 +0100
commite3fd13de885479b1f3a355cf4c86fbd4dd0f2495 (patch)
treefee1cf0a3c7a2437ac151fdf024c39460f045dcd /cron.php
parent68a7041348e592a8c8e35458a2355b0da2d99f79 (diff)
downloadnextcloud-server-e3fd13de885479b1f3a355cf4c86fbd4dd0f2495.tar.gz
nextcloud-server-e3fd13de885479b1f3a355cf4c86fbd4dd0f2495.zip
cron shall not operate in case we are in maintenance mode - fixes #14843
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php6
1 files changed, 5 insertions, 1 deletions
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