Feature: #107488 - Extensible scheduler task timing options
See forge#107488
Description
The scheduler task timing configuration has been migrated to the single TCA
execution_
field, which is of type json
. This field has
now been enhanced to allow extensions to customize the corresponding
timing-related fields, particularly the frequency field with custom cron
expressions. This is achieved through the new
override
option, available in the TCA field configuration.
Previously, frequency options were only configurable through the global
$GLOBALS
array, which has been moved to the TCA configuration to provide better
extensibility and consistency with TYPO3's configuration patterns, see
Breaking: #107488 - Scheduler frequency options moved to TCA.
Enhanced Customization Options
Field-level Configuration
Extensions can now override any timing-related field configuration using the
override
mechanism in the
execution_
field.
Available fields:
- Frequency field:
frequency
- Running type field:
running
Type - Parallel execution settings:
multiple
- Start/End date fields:
start
andend
Example Usage
Extensions can now add custom frequency options by creating a TCA override file:
// EXT:my_extension/Configuration/TCA/Overrides/tx_scheduler_task.php
$GLOBALS['TCA']['tx_scheduler_task']['columns']['execution_details']['config']['overrideFieldTca']['frequency']['config']['valuePicker']['items'][] = [
'value' => '0 2 * * *',
'label' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:daily_2am',
];
Extensions can now add a description:
// EXT:my_extension/Configuration/TCA/Overrides/tx_scheduler_task.php
$GLOBALS['TCA']['tx_scheduler_task']['columns']['execution_details']['config']['overrideFieldTca']['multiple'] = [
'description' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:multiple.description',
];
Impact
This enhancement provides a more flexible and extensible way to configure scheduler task timing options, allowing extensions to seamlessly integrate custom timing configurations while maintaining consistency with TYPO3's configuration patterns.