Mautic Community Forums

Is there any case against sequential cronning?

Hello all,

I have been using Mautic for a while now, but I recently began to implement sequntial cron jobs, they help my Mautic instances avoid parallel cron executions, I’m just wondering why they are not mentioned more or even just mentioned in the Documentation as the ideal Mautic cron set up?

Is there some sort of issue with using them? I see that there can be issues with 1 cron failing causing the other crons in the sequence to not run, but to me it’s better to run them sequentially and miss a few runs over the course of my mautic campaigns rather then have parallel crons stack up and cause system level bottlenecks.

1 Like

Hi,

Very interesting!

Could you give me more details about your sequential process?

How can I do this?

Regards.

Hey Jader,

You can set up sequential cron jobs by formatting your crons like this:

&& meaning each cron would run after the other completed. - Instead of having say 3 separate campaign related cron jobs you would have a single campaign cron job like the cron below which run each command “sequentially”

php /var/www/html/app/console mautic:segments:update && php /var/www/html/app/console mautic:campaigns:update --batch-limit=75 && php /var/www/html/app/console mautic:campaigns:trigger --batch-limit=75 &&

I like to set up Mautic Cron Jobs with a Nodejs app called Crontab-ui, it allows me to easily manage cron’s via a Gui and to test crons with a click of a run button. Feel free to check out a simple tutorial over it here: https://github.com/AdMigo/Mautic-Crontab-ui-tutorial

1 Like