Mautic Community Forums

User defined cron jobs or any form of customised background jobs

Hi all,

Is there a way to use user defined cron jobs?
What I have seen in the docu is that the jobs which can be registered in the cron table are all kind of provided by Mautic. What I would like to know is whether there is a way to define e. g. a service (or a method in a php class - whatever…) which can be triggered periodically within the scope of Mautic.

In case this is not possible: what is the Mautic way to let the developer implement own background jobs? Or to e. g. call a controller from the command line (e. g. via the composer-cli)?

I was thinking to use the system cron tab with an external script which then calls one of the urls which I specified in the Mautic config as a given route to a controller. Triggered by this “call” the controller could then perfrom some operations. However calling the controller by its url only returns the Mautic user login screen (which makes sense, when I think about it ;-)).