diff --git a/lib/Cron/Cache.php b/lib/Cron/Cache.php index 2552766f..afd05be6 100644 --- a/lib/Cron/Cache.php +++ b/lib/Cron/Cache.php @@ -76,7 +76,7 @@ class Cache extends TimedJob { * @throws QueryException */ protected function run($argument) { - $app = new Application(); + $app = \OC::$server->query(Application::class); $c = $app->getContainer(); $this->accountService = $c->query(AccountService::class); diff --git a/lib/Cron/Chunk.php b/lib/Cron/Chunk.php index 718737d4..7cfaba9d 100644 --- a/lib/Cron/Chunk.php +++ b/lib/Cron/Chunk.php @@ -66,7 +66,7 @@ class Chunk extends TimedJob { * @throws QueryException */ protected function run($argument) { - $app = new Application(); + $app = \OC::$server->query(Application::class); $c = $app->getContainer(); $this->configService = $c->query(ConfigService::class); diff --git a/lib/Cron/Queue.php b/lib/Cron/Queue.php index ce724b92..b915a78d 100644 --- a/lib/Cron/Queue.php +++ b/lib/Cron/Queue.php @@ -76,7 +76,7 @@ class Queue extends TimedJob { * @throws QueryException */ protected function run($argument) { - $app = new Application(); + $app = \OC::$server->query(Application::class); $c = $app->getContainer(); $this->requestQueueService = $c->query(RequestQueueService::class);