Issue Bug Closed

#85203Allow '00' as an element of a cron command

Michael Schams 06/10/18, 07:18 updated 10/02/18, 10:46

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.