setInterval(24 * 60 * 60); $this->setTimeSensitivity(self::TIME_INSENSITIVE); } public function run($argument) { $qb = $this->connection->getQueryBuilder(); $qb->selectDistinct('remote') ->from('share_external'); $result = $qb->executeQuery(); while ($row = $result->fetch()) { $this->discoveryService->discover($row['remote'], 'FEDERATED_SHARING', true); try { $this->ocmDiscoveryService->discover($row['remote'], true); } catch (OCMProviderException $e) { $this->logger->info('exception while running files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob', ['exception' => $e]); } } $result->closeCursor(); } }