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

Public Member Functions

 __construct (LoggerInterface $logger, TaskSerializer $taskSerializer, SchedulerTaskRepository $schedulerTaskRepository)
bool executeTask (AbstractTask $task)
 recordLastRun ($type='cron')

Public Attributes

array $extConf = []

Protected Member Functions

 cleanExecutionArrays ()

Protected Attributes

LoggerInterface $logger
TaskSerializer $taskSerializer
SchedulerTaskRepository $schedulerTaskRepository

Detailed Description

TYPO3 Scheduler. This class handles scheduling and execution of tasks.

Definition at line 33 of file Scheduler.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Scheduler\Scheduler::__construct ( LoggerInterface  $logger,
TaskSerializer  $taskSerializer,
SchedulerTaskRepository  $schedulerTaskRepository 

Member Function Documentation

◆ cleanExecutionArrays()

TYPO3\CMS\Scheduler\Scheduler::cleanExecutionArrays ( )

Cleans the execution lists of the scheduled tasks, executions older than 24h are removed

‪find a way to actually kill the job

Definition at line 65 of file Scheduler.php.

References $GLOBALS, TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Core\Database\Connection\PARAM_LOB.

Referenced by TYPO3\CMS\Scheduler\Scheduler\__construct().

◆ executeTask()

bool TYPO3\CMS\Scheduler\Scheduler::executeTask ( AbstractTask  $task)

This method executes the given task and properly marks and records that execution It is expected to return FALSE if the task was barred from running or if it was not saved properly

Task\AbstractTask$task‪The task to execute
‪bool Whether the task was saved successfully to the database or not

Definition at line 136 of file Scheduler.php.

References TYPO3\CMS\Scheduler\Task\AbstractTask\areMultipleExecutionsAllowed(), TYPO3\CMS\Scheduler\Task\AbstractTask\execute(), TYPO3\CMS\Scheduler\Task\AbstractTask\getTaskUid(), TYPO3\CMS\Scheduler\Task\AbstractTask\setRunOnNextCronJob(), and TYPO3\CMS\Scheduler\Task\AbstractTask\setScheduler().

◆ recordLastRun()

TYPO3\CMS\Scheduler\Scheduler::recordLastRun (   $type = 'cron')

This method stores information about the last run of the Scheduler into the system registry

string$type‪Type of run (manual or command-line (assumed to be cron))

Definition at line 209 of file Scheduler.php.

References $GLOBALS.

Member Data Documentation

◆ $extConf

array TYPO3\CMS\Scheduler\Scheduler::$extConf = []

Definition at line 42 of file Scheduler.php.

◆ $logger

LoggerInterface TYPO3\CMS\Scheduler\Scheduler::$logger

Definition at line 35 of file Scheduler.php.

Referenced by TYPO3\CMS\Scheduler\Scheduler\__construct().

◆ $schedulerTaskRepository

SchedulerTaskRepository TYPO3\CMS\Scheduler\Scheduler::$schedulerTaskRepository

Definition at line 37 of file Scheduler.php.

Referenced by TYPO3\CMS\Scheduler\Scheduler\__construct().

◆ $taskSerializer

TaskSerializer TYPO3\CMS\Scheduler\Scheduler::$taskSerializer

Definition at line 36 of file Scheduler.php.

Referenced by TYPO3\CMS\Scheduler\Scheduler\__construct().