. * */ namespace OCA\Passman\BackgroundJob; use OC\BackgroundJob\TimedJob; use \OCA\Passman\AppInfo\Application; use OCP\IConfig; /** * Class ExpireCredentials * * @package OCA\Passman\BackgroundJob */ class ExpireCredentials extends TimedJob { /** @var IConfig */ protected $config; /** * @param IConfig $config */ public function __construct(IConfig $config) { // Run once per minute $this->setInterval(60); $this->config = $config; } protected function run($argument) { $app = new Application(); $container = $app->getContainer(); $container->query('CronService')->expireCredentials(); } }