[BUGFIX] Allow leading zeros in croncommand 70/60770/8
authorTomas Norre Mikkelsen <tomasnorre@gmail.com>
Thu, 16 May 2019 15:05:41 +0000 (17:05 +0200)
committerSusanne Moog <look@susi.dev>
Fri, 24 May 2019 12:56:13 +0000 (14:56 +0200)
commitae298bfa8729760e839d81d5a9dfd2a90336f043
treedbada0a84126bc6fbcf4ecec6e04c17af877d90d
parent266acc15b8ecc2abcb09cf78ef368a417a91e613
[BUGFIX] Allow leading zeros in croncommand

The Scheduler system extension requires a valid cron command or
seconds between scheduler runs.

With this commit, the Scheduler now allows "15 2 * * *" as well as
"15 02 * * *". The latter one was not accepted till now.

The "02" for the hours or minutes are valid cron times,
and therefore it should also be allowed in the Scheduler.

Resolves: #88371
Releases: master, 9.5
Change-Id: I2ed3d6c4cf445bf0692726c49b5c9207af2e9628
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60770
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Guido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Susanne Moog <look@susi.dev>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Guido Schmechel <guido.schmechel@brandung.de>
Tested-by: Jörg Bösche <typo3@joergboesche.de>
Tested-by: Susanne Moog <look@susi.dev>
typo3/sysext/scheduler/Classes/CronCommand/NormalizeCommand.php
typo3/sysext/scheduler/Tests/Unit/CronCommand/NormalizeCommandTest.php