aboutsummaryrefslogtreecommitdiff
path: root/cli/Commands/Cronjobs/CronjobWorker.php
blob: 209f11286bc0834a8a23cb69b7895688fda5295d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

namespace Studip\Cli\Commands\Cronjobs;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class CronjobWorker extends Command
{
    protected static $defaultName = 'cronjobs:worker';

    protected function configure(): void
    {
        $this->setDescription('Cronjob worker.');
        $this->setHelp('Worker process for the cronjobs.');
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        \CronjobScheduler::getInstance()->run();
        return Command::SUCCESS;
    }
}