28 lines
725 B
PHP
28 lines
725 B
PHP
<?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);
|
|
}
|
|
}
|
|
}
|