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

Public Member Functions

 __construct (Scheduler $scheduler)
 
 configure ()
 
int execute (InputInterface $input, OutputInterface $output)
 

Protected Member Functions

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

Protected Attributes

Scheduler $scheduler
 
SymfonyStyle $io
 
int[] 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.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Scheduler\Command\SchedulerCommand::__construct ( Scheduler  $scheduler)

Member Function Documentation

◆ configure()

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

Configure the command by defining the name, options and arguments

Definition at line 66 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 243 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 217 of file SchedulerCommand.php.

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

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

◆ getTask()

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

Return task a task for a given UID

Parameters
int$taskUid
Returns
‪AbstractTask|null

Definition at line 162 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 126 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().

◆ $scheduler

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

◆ $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.