Scheduler task storage 

Changed in version 14.0

With TYPO3 v14.0 the storage of scheduler tasks switched from the PHP-serialized storage format in the database to a JSON-based format.

The scheduler tasks displayed in backend module Administration > Scheduler are stored in the database table tx_scheduler_task . Task groups are stored in table tx_scheduler_task_group .

tx_scheduler_task fields 

The database table tx_scheduler_task contains the following fields:

tasktype
Typically contains the fully qualified class name of the task, for example \TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionTask or the command name, for example language:update if the task is implemented as Symfony console command.
parameters
The options configuring the task as JSON-encoded value.
execution_details
Contains all details on execution like the type (Recurring / Single), start and end dates and the frequency in which recurring tasks should be executed.
priority
The priority of the task as an integer: 150 (High), 100 (Regular, default), or 50 (Low).

Additionally it stores some information on the last and next execution of the task, and fields for a description and the group.

Task priority levels 

The field priority is a plain integer column. Any positive integer is a valid priority. To add a priority level, add an item to the TCA of the field:

EXT:my_extension/Configuration/TCA/Overrides/tx_scheduler_task.php
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

ExtensionManagementUtility::addTcaSelectItem(
  'tx_scheduler_task',
  'priority',
  [
    'label' => 'my_extension.messages:priority.critical',
    'value' => 200,
  ],
  '150',
  'after',
);
Copied!

Tasks with a value above 150 are executed before tasks with the priority High. Tasks with a value below 50 are executed after tasks with the priority Low.

The Scheduler module shows the label of the TCA item in the task list. The label must be a valid language label. If no TCA item matches the value, the module shows the integer.

Migration from serialized task objects