Actions
Bug #85203
closedAllow '00' as an element of a cron command
Status:
Closed
Priority:
Could have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2018-06-10
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
Description
When entering the execution frequency of a scheduler task, either seconds or a cron-like syntax (minutes, hours, day of month, months and day of week) can be used.
Quote:
The frequency of the task can be simply entered as a number of seconds. Alternatively it is possible to use the same syntax as for cron jobs. This is simply a list of five numbers or the wildcard "*", separated by blanks. The five numbers are (in order) minutes, hours, day of month, months and day of week. Examples: */5 * * * * means every 5 minutes 30 22 * * * means every day at 22:30 The Scheduler supports the full cron syntax.
This is not exactly true, because a double zero "00
" is a valid value in cron, but results in an error in TYPO3:
Invalid frequency. Please enter either a number of seconds or a valid cron command. The cron parser said: Unable to normalize integer field. [code: 1291429389].
Something like the following examples should be possible in TYPO3, too, to fully support the cron syntax:
00 1 * * *
(at 1:00 hrs, every day)20 00 * * *
(20 minutes past midnight, every day)
See methods in class TYPO3\CMS\Scheduler\CronCommand\NormalizeCommand
.
Updated by Georg Ringer almost 6 years ago
- Related to Feature #85368: Use dragonmantank/cron-expression to calculate cron commands added
Updated by Georg Ringer almost 6 years ago
- Status changed from New to Resolved
solved with #85368 when it is being merged
Actions