diff --git a/lib/Cron/CardDescriptionActivity.php b/lib/Cron/CardDescriptionActivity.php index bf3cee9e8..14f73965b 100644 --- a/lib/Cron/CardDescriptionActivity.php +++ b/lib/Cron/CardDescriptionActivity.php @@ -24,7 +24,7 @@ namespace OCA\Deck\Cron; -use OC\BackgroundJob\Job; +use OCP\BackgroundJob\Job; use OCA\Deck\Activity\ActivityManager; use OCA\Deck\Db\CardMapper; diff --git a/lib/Cron/DeleteCron.php b/lib/Cron/DeleteCron.php index 49a26d136..f6554edb7 100644 --- a/lib/Cron/DeleteCron.php +++ b/lib/Cron/DeleteCron.php @@ -24,13 +24,14 @@ namespace OCA\Deck\Cron; -use OC\BackgroundJob\Job; +use OCP\BackgroundJob\TimedJob; use OCA\Deck\Db\AttachmentMapper; use OCA\Deck\Db\BoardMapper; use OCA\Deck\InvalidAttachmentType; use OCA\Deck\Service\AttachmentService; +use OCP\BackgroundJob\IJob; -class DeleteCron extends Job { +class DeleteCron extends TimedJob { /** @var BoardMapper */ private $boardMapper; @@ -43,6 +44,9 @@ public function __construct(BoardMapper $boardMapper, AttachmentService $attachm $this->boardMapper = $boardMapper; $this->attachmentService = $attachmentService; $this->attachmentMapper = $attachmentMapper; + + $this->setInterval(60 * 60 * 24); + $this->setTimeSensitivity(IJob::TIME_INSENSITIVE); } /** diff --git a/lib/Cron/ScheduledNotifications.php b/lib/Cron/ScheduledNotifications.php index fe42168e5..c6fbdd381 100644 --- a/lib/Cron/ScheduledNotifications.php +++ b/lib/Cron/ScheduledNotifications.php @@ -23,7 +23,7 @@ namespace OCA\Deck\Cron; -use OC\BackgroundJob\Job; +use OCP\BackgroundJob\Job; use OCA\Deck\Db\Card; use OCA\Deck\Db\CardMapper; use OCA\Deck\Notification\NotificationHelper;