This commit is contained in:
Patrick Niebeling
2025-03-12 10:46:58 +01:00
parent 05f50ea068
commit 054cdb70c8
10 changed files with 151 additions and 167 deletions

View File

@ -0,0 +1,27 @@
<?php
namespace OCA\Deckflow\Cron;
use OCP\BackgroundJob\TimedJob;
use OCA\Deckflow\Service\WorkflowService;
class MoveOverdueCardsJob extends TimedJob {
private $workflowService;
public function __construct(WorkflowService $workflowService) {
parent::__construct();
$this->workflowService = $workflowService;
}
/**
* Ausführen des Cronjobs
*/
protected function run($argument) {
try {
// Überfällige Karten verschieben
$this->workflowService->moveOverdueCards();
} catch (\Exception $e) {
\OCP\Util::writeLog('deckflow', 'Fehler beim Ausführen des Cronjobs: ' . $e->getMessage(), \OCP\Util::ERROR);
}
}
}