SchedulerCommand extends Command

CLI command for the 'scheduler' extension which executes

Internal

Specific command implementation, not part of TYPO3 API.

Table of Contents

Properties

$forceExecution  : bool
$io  : SymfonyStyle
$overwrittenTaskList  : array<string|int, int>|null
Array of tasks UIDs that should be executed. Null if task option is not provided.
$scheduler  : Scheduler
$stopTasks  : bool
This is true when the tasks should be marked as stopped instead of being executed.
$taskRepository  : SchedulerTaskRepository

Methods

__construct()  : mixed
configure()  : mixed
Configure the command by defining the name, options and arguments
execute()  : int
Execute scheduler tasks
executeOrStopTask()  : void
When in stop mode the given task is stopped. Otherwise the task is executed.
fetchNextTask()  : AbstractTask|null
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.
getTask()  : AbstractTask|null
Return task a task for a given UID
loopTasks()  : bool
Execute tasks in loop that are ready to execute
shouldStopTasks()  : bool
Checks if the tasks should be stopped instead of being executed.
stopTask()  : mixed
Stop task

Properties

$forceExecution

protected bool $forceExecution

$overwrittenTaskList

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

protected array<string|int, int>|null $overwrittenTaskList

$stopTasks

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

protected bool $stopTasks = false

Methods

configure()

Configure the command by defining the name, options and arguments

public configure() : mixed

execute()

Execute scheduler tasks

protected execute(InputInterface $input, OutputInterface $output) : int
Parameters
$input : InputInterface
$output : OutputInterface
Return values
int

executeOrStopTask()

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

protected executeOrStopTask(AbstractTask $task) : void
Parameters
$task : AbstractTask

fetchNextTask()

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.

protected fetchNextTask() : AbstractTask|null

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

Tags
throws
UnexpectedValueException

When no task is found by the provided UID or the task is not marked for execution.

Return values
AbstractTask|null

loopTasks()

Execute tasks in loop that are ready to execute

protected loopTasks() : bool
Return values
bool

shouldStopTasks()

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

protected shouldStopTasks(bool $stopOption) : bool

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

Parameters
$stopOption : bool
Return values
bool

        
On this page

Search results