Signed-off-by: Joas Schilling <coding@schilljs.com>tags/v24.0.0beta1
use OCA\ContactsInteraction\Db\RecentContactMapper; | use OCA\ContactsInteraction\Db\RecentContactMapper; | ||||
use OCP\AppFramework\Utility\ITimeFactory; | use OCP\AppFramework\Utility\ITimeFactory; | ||||
use OCP\BackgroundJob\IJob; | |||||
use OCP\BackgroundJob\TimedJob; | use OCP\BackgroundJob\TimedJob; | ||||
class CleanupJob extends TimedJob { | class CleanupJob extends TimedJob { | ||||
RecentContactMapper $mapper) { | RecentContactMapper $mapper) { | ||||
parent::__construct($time); | parent::__construct($time); | ||||
$this->setInterval(12 * 60 * 60); | |||||
$this->setInterval(24 * 60 * 60); | |||||
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE); | |||||
$this->mapper = $mapper; | $this->mapper = $mapper; | ||||
} | } |
use OC\User\NoUserException; | use OC\User\NoUserException; | ||||
use OCP\AppFramework\Utility\ITimeFactory; | use OCP\AppFramework\Utility\ITimeFactory; | ||||
use OCP\BackgroundJob\IJob; | |||||
use OCP\BackgroundJob\IJobList; | use OCP\BackgroundJob\IJobList; | ||||
use OCP\BackgroundJob\TimedJob; | use OCP\BackgroundJob\TimedJob; | ||||
use OCP\Files\File; | use OCP\Files\File; | ||||
// Run once a day | // Run once a day | ||||
$this->setInterval(60 * 60 * 24); | $this->setInterval(60 * 60 * 24); | ||||
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE); | |||||
} | } | ||||
protected function run($argument) { | protected function run($argument) { |
use OCA\Files_External\Lib\StorageConfig; | use OCA\Files_External\Lib\StorageConfig; | ||||
use OCA\Files_External\Service\UserGlobalStoragesService; | use OCA\Files_External\Service\UserGlobalStoragesService; | ||||
use OCP\AppFramework\Utility\ITimeFactory; | use OCP\AppFramework\Utility\ITimeFactory; | ||||
use OCP\BackgroundJob\IJob; | |||||
use OCP\BackgroundJob\TimedJob; | use OCP\BackgroundJob\TimedJob; | ||||
use OCP\Security\ICredentialsManager; | use OCP\Security\ICredentialsManager; | ||||
use OCP\IUser; | use OCP\IUser; | ||||
// run every day | // run every day | ||||
$this->setInterval(24 * 60 * 60); | $this->setInterval(24 * 60 * 60); | ||||
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE); | |||||
} | } | ||||
protected function run($argument) { | protected function run($argument) { |
namespace OCA\Files_Sharing; | namespace OCA\Files_Sharing; | ||||
use OCP\AppFramework\Utility\ITimeFactory; | use OCP\AppFramework\Utility\ITimeFactory; | ||||
use OCP\BackgroundJob\IJob; | |||||
use OCP\BackgroundJob\TimedJob; | use OCP\BackgroundJob\TimedJob; | ||||
use OCP\IDBConnection; | use OCP\IDBConnection; | ||||
use OCP\Share\Exceptions\ShareNotFound; | use OCP\Share\Exceptions\ShareNotFound; | ||||
// Run once a day | // Run once a day | ||||
$this->setInterval(24 * 60 * 60); | $this->setInterval(24 * 60 * 60); | ||||
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE); | |||||
} | } | ||||
use OCP\AppFramework\Utility\ITimeFactory; | use OCP\AppFramework\Utility\ITimeFactory; | ||||
use OCP\Authentication\TwoFactorAuth\IRegistry; | use OCP\Authentication\TwoFactorAuth\IRegistry; | ||||
use OCP\BackgroundJob\IJob; | |||||
use OCP\BackgroundJob\IJobList; | use OCP\BackgroundJob\IJobList; | ||||
use OCP\BackgroundJob\TimedJob; | use OCP\BackgroundJob\TimedJob; | ||||
use OCP\IUserManager; | use OCP\IUserManager; | ||||
$this->jobList = $jobList; | $this->jobList = $jobList; | ||||
$this->setInterval(60 * 60 * 24 * 14); | $this->setInterval(60 * 60 * 24 * 14); | ||||
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE); | |||||
} | } | ||||
protected function run($argument) { | protected function run($argument) { |
namespace OC\Security\Bruteforce; | namespace OC\Security\Bruteforce; | ||||
use OCP\AppFramework\Utility\ITimeFactory; | use OCP\AppFramework\Utility\ITimeFactory; | ||||
use OCP\BackgroundJob\IJob; | |||||
use OCP\BackgroundJob\TimedJob; | use OCP\BackgroundJob\TimedJob; | ||||
use OCP\DB\QueryBuilder\IQueryBuilder; | use OCP\DB\QueryBuilder\IQueryBuilder; | ||||
use OCP\IDBConnection; | use OCP\IDBConnection; | ||||
// Run once a day | // Run once a day | ||||
$this->setInterval(3600 * 24); | $this->setInterval(3600 * 24); | ||||
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE); | |||||
} | } | ||||
protected function run($argument) { | protected function run($argument) { |