aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-08-26 19:29:57 +0200
committerGitHub <noreply@github.com>2019-08-26 19:29:57 +0200
commit505f10044ab93f3b7d7a1be77ad9c41a5a90b341 (patch)
tree75fec19122d2c3ab3c3291f86561a4f079ee7b1a /settings
parent6df6fc562404f885bd02e125391620d4153c8f95 (diff)
parentdb968cb1d415f1998be6df73b365ae5ca04686ad (diff)
downloadnextcloud-server-505f10044ab93f3b7d7a1be77ad9c41a5a90b341.tar.gz
nextcloud-server-505f10044ab93f3b7d7a1be77ad9c41a5a90b341.zip
Merge pull request #16865 from nextcloud/bugfix/noid/5-min-cron
Cron should run every 5 mins
Diffstat (limited to 'settings')
-rw-r--r--settings/Settings/Admin/Server.php35
-rw-r--r--settings/templates/settings/admin/server.php6
2 files changed, 6 insertions, 35 deletions
diff --git a/settings/Settings/Admin/Server.php b/settings/Settings/Admin/Server.php
index 1ebea8a4dcd..bceca06812c 100644
--- a/settings/Settings/Admin/Server.php
+++ b/settings/Settings/Admin/Server.php
@@ -26,48 +26,19 @@
namespace OC\Settings\Admin;
-use Doctrine\DBAL\Connection;
-use Doctrine\DBAL\DBALException;
-use Doctrine\DBAL\Platforms\SqlitePlatform;
-use OC\Lock\DBLockingProvider;
-use OC\Lock\NoopLockingProvider;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IConfig;
-use OCP\IDBConnection;
-use OCP\IL10N;
-use OCP\IRequest;
-use OCP\Lock\ILockingProvider;
use OCP\Settings\ISettings;
class Server implements ISettings {
- /** @var IDBConnection|Connection */
- private $db;
- /** @var IRequest */
- private $request;
/** @var IConfig */
private $config;
- /** @var ILockingProvider */
- private $lockingProvider;
- /** @var IL10N */
- private $l;
/**
- * @param IDBConnection $db
- * @param IRequest $request
* @param IConfig $config
- * @param ILockingProvider $lockingProvider
- * @param IL10N $l
*/
- public function __construct(IDBConnection $db,
- IRequest $request,
- IConfig $config,
- ILockingProvider $lockingProvider,
- IL10N $l) {
- $this->db = $db;
- $this->request = $request;
+ public function __construct(IConfig $config) {
$this->config = $config;
- $this->lockingProvider = $lockingProvider;
- $this->l = $l;
}
/**
@@ -89,7 +60,7 @@ class Server implements ISettings {
/**
* @return string the section ID, e.g. 'sharing'
*/
- public function getSection() {
+ public function getSection(): string {
return 'server';
}
@@ -100,7 +71,7 @@ class Server implements ISettings {
*
* E.g.: 70
*/
- public function getPriority() {
+ public function getPriority(): int {
return 0;
}
}
diff --git a/settings/templates/settings/admin/server.php b/settings/templates/settings/admin/server.php
index 3536c05e995..92bf433ca6c 100644
--- a/settings/templates/settings/admin/server.php
+++ b/settings/templates/settings/admin/server.php
@@ -34,7 +34,7 @@
$formatter = \OC::$server->getDateTimeFormatter();
$absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long');
- if (time() - $_['lastcron'] <= 3600): ?>
+ if (time() - $_['lastcron'] <= 600): ?>
<span class="status success"></span>
<span class="crondate" title="<?php p($absolute_time);?>">
<?php p($l->t("Last job ran %s.", [$relative_time]));?>
@@ -72,7 +72,7 @@
print_unescaped('checked="checked"');
} ?>>
<label for="backgroundjobs_webcron">Webcron</label><br/>
- <em><?php p($l->t("cron.php is registered at a webcron service to call cron.php every 15 minutes over HTTP.")); ?></em>
+ <em><?php p($l->t("cron.php is registered at a webcron service to call cron.php every 5 minutes over HTTP.")); ?></em>
</p>
<p>
<input type="radio" name="mode" value="cron" class="radio"
@@ -83,7 +83,7 @@
print_unescaped('disabled');
}?>>
<label for="backgroundjobs_cron">Cron</label><br/>
- <em><?php p($l->t("Use system cron service to call the cron.php file every 15 minutes.")); ?>
+ <em><?php p($l->t("Use system cron service to call the cron.php file every 5 minutes.")); ?>
<?php if($_['cli_based_cron_possible']) {
p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']]));
} else {