‪TYPO3CMS  ‪main
TYPO3\CMS\Scheduler\Command\SchedulerCommand Class Reference
Inheritance diagram for TYPO3\CMS\Scheduler\Command\SchedulerCommand:

Public Member Functions

 __construct (protected readonly Scheduler $scheduler, protected readonly SchedulerTaskRepository $taskRepository)
 
 configure ()
 

Protected Member Functions

 execute (InputInterface $input, OutputInterface $output)
 
 shouldStopTasks (bool $stopOption)
 
 stopTask (AbstractTask $task)
 
 getTask (int $taskUid)
 
 loopTasks ()
 
 fetchNextTask ()
 
 executeOrStopTask (AbstractTask $task)
 

Protected Attributes

SymfonyStyle $io
 
int[] null $overwrittenTaskList
 
bool $stopTasks = false
 
bool $forceExecution
 

Detailed Description

CLI command for the 'scheduler' extension which executes

Specific command implementation, not part of TYPO3 API.

Definition at line 35 of file SchedulerCommand.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Scheduler\Command\SchedulerCommand::__construct ( protected readonly Scheduler  $scheduler,
protected readonly SchedulerTaskRepository  $taskRepository 
)

Definition at line 57 of file SchedulerCommand.php.

Member Function Documentation

◆ configure()

TYPO3\CMS\Scheduler\Command\SchedulerCommand::configure ( )

Configure the command by defining the name, options and arguments

Definition at line 67 of file SchedulerCommand.php.

◆ execute()

◆ executeOrStopTask()

TYPO3\CMS\Scheduler\Command\SchedulerCommand::executeOrStopTask ( AbstractTask  $task)
protected

When in stop mode the given task is stopped. Otherwise the task is executed.

Definition at line 230 of file SchedulerCommand.php.

References TYPO3\CMS\Scheduler\Task\AbstractTask\getTaskUid(), and TYPO3\CMS\Scheduler\Command\SchedulerCommand\stopTask().

Referenced by TYPO3\CMS\Scheduler\Command\SchedulerCommand\loopTasks().

◆ fetchNextTask()

TYPO3\CMS\Scheduler\Command\SchedulerCommand::fetchNextTask ( )
protected

When the –task option is provided, the next task is fetched from the provided task UIDs. Depending on the –force option the task is fetched even if it is not marked for execution.

Without the –task option we ask the scheduler for the next task with pending execution.

Exceptions

Definition at line 206 of file SchedulerCommand.php.

References TYPO3\CMS\Scheduler\Command\SchedulerCommand\getTask().

Referenced by TYPO3\CMS\Scheduler\Command\SchedulerCommand\loopTasks().

◆ getTask()

TYPO3\CMS\Scheduler\Command\SchedulerCommand::getTask ( int  $taskUid)
protected

◆ loopTasks()

TYPO3\CMS\Scheduler\Command\SchedulerCommand::loopTasks ( )
protected

◆ shouldStopTasks()

TYPO3\CMS\Scheduler\Command\SchedulerCommand::shouldStopTasks ( bool  $stopOption)
protected

Checks if the tasks should be stopped instead of being executed.

Stopping is only performed when the –stop option is provided together with the –task option.

Parameters
bool$stopOption

Definition at line 122 of file SchedulerCommand.php.

Referenced by TYPO3\CMS\Scheduler\Command\SchedulerCommand\execute().

◆ stopTask()

TYPO3\CMS\Scheduler\Command\SchedulerCommand::stopTask ( AbstractTask  $task)
protected

Member Data Documentation

◆ $forceExecution

bool TYPO3\CMS\Scheduler\Command\SchedulerCommand::$forceExecution
protected

◆ $io

SymfonyStyle TYPO3\CMS\Scheduler\Command\SchedulerCommand::$io
protected

Definition at line 39 of file SchedulerCommand.php.

◆ $overwrittenTaskList

int [] null TYPO3\CMS\Scheduler\Command\SchedulerCommand::$overwrittenTaskList
protected

Array of tasks UIDs that should be executed. Null if task option is not provided.

Definition at line 45 of file SchedulerCommand.php.

Referenced by TYPO3\CMS\Scheduler\Command\SchedulerCommand\execute().

◆ $stopTasks

bool TYPO3\CMS\Scheduler\Command\SchedulerCommand::$stopTasks = false
protected

This is true when the tasks should be marked as stopped instead of being executed.

Definition at line 51 of file SchedulerCommand.php.