Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/cron.php b/cron.php
index 643c42688df..b566f7ea340 100644
--- a/cron.php
+++ b/cron.php
@@ -63,7 +63,7 @@ try {
$logger = \OC::$server->getLogger();
$config = \OC::$server->getConfig();
- // Don't do anything if ownCloud has not been installed
+ // Don't do anything if Nextcloud has not been installed
if (!$config->getSystemValue('installed', false)) {
exit(0);
}
@@ -71,8 +71,8 @@ try {
\OC::$server->getTempManager()->cleanOld();
// Exit if background jobs are disabled!
- $appMode = \OCP\BackgroundJob::getExecutionType();
- if ($appMode == 'none') {
+ $appMode = $config->getAppValue('core', 'backgroundjobs_mode', 'ajax');
+ if ($appMode === 'none') {
if (OC::$CLI) {
echo 'Background Jobs are disabled!' . PHP_EOL;
} else {
@@ -101,9 +101,9 @@ try {
exit(1);
}
- // We call ownCloud from the CLI (aka cron)
- if ($appMode != 'cron') {
- \OCP\BackgroundJob::setExecutionType('cron');
+ // We call Nextcloud from the CLI (aka cron)
+ if ($appMode !== 'cron') {
+ $config->setAppValue('core', 'backgroundjobs_mode', 'cron');
}
// Work