I discovered a really weird behaviour in my TYPO3 scheduler: I created a task with the frequency * */1 * * *
, so it should run every hour. But in "next execution" it's written, that it will run the next minute. So I tried to use "real" seconds, and set the frequency to "3600" (= 1 hour). Now it shows that the next execution will be in 3 minutes. If I use "300" it will run in 4 minutes.
Is this a bug in TYPO3 scheduler or does anyone has an idea what's the problem here?
I'm running TYPO3 8.4 on a Debian 8.6, Apache 2, PHP 7. In crontab following line is set: */1 * * * * /usr/bin/php /var/www/fareith/htdocs/typo3/cli_dispatch.phpsh scheduler
you need to get familiar with the syntax for crontab entries. That syntax is:
* * * * * command
┬ ┬ ┬ ┬ ┬
│ │ │ │ │
│ │ │ │ └──── day of week (0-7, sunday is 0 or 7)
│ │ │ └────── month (1-12)
│ │ └──────── day (1-31)
│ └────────── hour (0-23)
└──────────── minute (0-59)
if you set a value at any place that fixes that part of execution date/time. multiple values could be set by separating them with a comma (no spaces!).
Aside of that there is the notation */3
(star divided by value) which means: at every value units (*/3
in the first place means: every three minutes)
So an entry like */1 * * * * command
means: execute "command" every minute.*/1
is the same as just a star *
: execute at every unit.
For an execution once each hour you need to fix the minute value by setting any fixed value.
And for the values of seconds: the next execution time is calculated from last execution (or the time of creation) of the scheduler entry.
At last:
A scheduler job can not run more often than the scheduler runs itself. Normaly the scheduler is started at each minute (as your example shows), but at some providers the scheduler is only called every 15 minutes (*/15 * * * * php ..../cli_dispatch.phpsh scheduler
). And even if you configure jobs inside of TYPO3 to start more often, they will only start at the next run of the scheduler itself.