Reputation: 303
everytime I have to write a Scheduler Task, I think about what the best way is to implement the task. To write an own Scheduler Task or use the Extbase Command Controller. Are there cases where a version should be preferred? Or is there a general workflow? Thanks for help.
Upvotes: 3
Views: 1175
Reputation: 276
Writing an Extbase command controller has the benefit of (possibly) having a nice CLI for your task; Though with TYPO3 8 there seems to be a move towards Symfony console for some system level commands.
The main difference lies in validation of arguments; For Extbase command controllers all validation is generated from your parameter annotations. None of that is done at configuration time (which is a clear omission to me), all at run time. "old school" Scheduler tasks allow for argument validation via additional Fields. These checks happen at configuration time.
Realistically I've not seen many installations where configuration of tasks is done by the customer. The benefit of easier programming that is more in line with what is current standard in TYPO3 extension programming outweighs the disadvantage of not having configuration time validation.
Upvotes: 3