summaryrefslogtreecommitdiffstats
path: root/lib/Cron/Updater.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Cron/Updater.php')
-rw-r--r--lib/Cron/Updater.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Cron/Updater.php b/lib/Cron/Updater.php
index 55afe0a38..66ca4a908 100644
--- a/lib/Cron/Updater.php
+++ b/lib/Cron/Updater.php
@@ -11,13 +11,13 @@
namespace OCA\News\Cron;
-use OC\BackgroundJob\Job;
+use OC\BackgroundJob\TimedJob;
use OCA\News\Config\Config;
use OCA\News\Service\StatusService;
use OCA\News\Utility\Updater as UpdaterService;
-class Updater extends Job
+class Updater extends TimedJob
{
/**
@@ -34,6 +34,7 @@ class Updater extends Job
private $updaterService;
public function __construct(
+ ITimeFactroy $time,
Config $config,
StatusService $status,
UpdaterService $updaterService
@@ -41,6 +42,8 @@ class Updater extends Job
$this->config = $config;
$this->status = $status;
$this->updaterService = $updaterService;
+
+ parent::setInterval($this->config->getupdateInterval());
}
protected function run($argument)