. * */ namespace OCA\Passman\BackgroundJob; use OC\BackgroundJob\TimedJob; use OCA\Passman\Service\CronService; use OCP\IConfig; /** * Class ExpireCredentials * * @package OCA\Passman\BackgroundJob */ class ExpireCredentials extends TimedJob { protected IConfig $config; private CronService $cronService; /** * ExpireCredentials constructor. * @param IConfig $config * @param CronService $cronService */ public function __construct(IConfig $config, CronService $cronService) { // Run once per minute $this->setInterval(60); $this->config = $config; $this->cronService = $cronService; } protected function run($argument) { $this->cronService->expireCredentials(); } }