Fix
This commit is contained in:
27
lib/Cron/MoveOverdueCardsJob.php
Normal file
27
lib/Cron/MoveOverdueCardsJob.php
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user