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

Public Member Functions

 configure ()
 
int execute (InputInterface $input, OutputInterface $output)
 

Protected Member Functions

bool shouldStopTasks (bool $stopOption)
 
 stopTask (AbstractTask $task)
 
AbstractTask getTask (int $taskUid)
 
 loopTasks ()
 
AbstractTask fetchNextTask ()
 
 executeOrStopTask (AbstractTask $task)
 

Protected Attributes

bool $hasTask = true
 
Scheduler $scheduler
 
SymfonyStyle $io
 
int[] array null $overwrittenTaskList
 
bool $stopTasks = false
 
bool $forceExecution
 

Detailed Description

CLI command for the 'scheduler' extension which executes

Definition at line 31 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 64 of file SchedulerCommand.php.

◆ execute()

int TYPO3\CMS\Scheduler\Command\SchedulerCommand::execute ( InputInterface  $input,
OutputInterface  $output 
)

◆ executeOrStopTask()

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

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

Parameters
AbstractTask$task

Definition at line 246 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()

AbstractTask 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.

Returns
‪AbstractTask
Exceptions

Definition at line 220 of file SchedulerCommand.php.

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

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

◆ getTask()

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

Return task a task for a given UID

Parameters
int$taskUid
Returns
‪AbstractTask

Definition at line 161 of file SchedulerCommand.php.

References TYPO3\CMS\Scheduler\Command\SchedulerCommand\$forceExecution, and $GLOBALS.

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

◆ loopTasks()

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

◆ shouldStopTasks()

bool 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
Returns
‪bool

Definition at line 125 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

◆ $hasTask

bool TYPO3\CMS\Scheduler\Command\SchedulerCommand::$hasTask = true
protected

Definition at line 35 of file SchedulerCommand.php.

◆ $io

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

Definition at line 43 of file SchedulerCommand.php.

◆ $overwrittenTaskList

int [] array 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 49 of file SchedulerCommand.php.

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

◆ $scheduler

Scheduler TYPO3\CMS\Scheduler\Command\SchedulerCommand::$scheduler
protected

Definition at line 39 of file SchedulerCommand.php.

◆ $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 55 of file SchedulerCommand.php.