Processes and runtime · Question 3 of 12
How do you run a custom console command in TYPO3 automatically on a regular basis?
1 answer is correct. Easy
Show answer
Answer
- A With a scheduler task "Execute console commands" that a cron job triggers via scheduler:run
Explanation
With the system extension Scheduler, you create a task of type "Execute console commands" in the backend, select your command and define the interval or cron expression. For the scheduler to actually do its work, a cron job on the server regularly calls vendor/bin/typo3 scheduler:run, for example every five minutes. #[AsCommand] is needed for the command to exist at all, but it does not schedule it. Code in ext_localconf.php runs on every request and is unsuitable and slow for timed tasks.