Mautic Community Forums

What are the best timing settings for cron

May i know what are the best settings for the cron timings… i read that you should not have them overlap. But some run really fast some really long which should be set for which? The below is mine… advice anyone?

Code:
*/15 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:webhooks:process > /dev/null 2>&1 * * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:messages:send > /var/log/mautic/mydomain-messages-process.log 2>&1 */10 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:campaigns:rebuild > /dev/null 2>&1 */10 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:campaigns:trigger > /dev/null 2>&1 * * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:emails:send > /var/log/mautic/mydomain-email-process.log 2>&1 0 0 * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:email:fetch > /dev/null 2>&1 0 0 * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:iplookup:download > /dev/null 2>&1 */15 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:segments:update > /dev/null 2>&1

May i know what are the best settings for the cron timings… i read that you should not have them overlap. But some run really fast some really long which should be set for which? The below is mine… advice anyone?

[code]*/15 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:webhooks:process > /dev/null 2>&1

          • /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:messages:send > /var/log/mautic/mydomain-messages-process.log 2>&1
            */10 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:campaigns:rebuild > /dev/null 2>&1
            */10 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:campaigns:trigger > /dev/null 2>&1
          • /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:emails:send > /var/log/mautic/mydomain-email-process.log 2>&1
            0 0 * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:email:fetch > /dev/null 2>&1
            0 0 * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:iplookup:download > /dev/null 2>&1
            */15 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:segments:update > /dev/null 2>&1[/code]

The important one is campaigns:trigger

I set that to run every minute since that one is responsible for sending out emails once someone is added to a segment.

The other cronjobs are not so time sensitive. I’ve set them to 5 minutes. But 30 minutes is ok too.

[quote=19842:@chizuoka@gmail.com]May i know what are the best settings for the cron timings… i read that you should not have them overlap. But some run really fast some really long which should be set for which? The below is mine… advice anyone?

[code]*/15 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:webhooks:process > /dev/null 2>&1

          • /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:messages:send > /var/log/mautic/mydomain-messages-process.log 2>&1
            */10 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:campaigns:rebuild > /dev/null 2>&1
            */10 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:campaigns:trigger > /dev/null 2>&1
          • /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:emails:send > /var/log/mautic/mydomain-email-process.log 2>&1
            0 0 * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:email:fetch > /dev/null 2>&1
            0 0 * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:iplookup:download > /dev/null 2>&1
            */15 * * * * /usr/bin/env php /var/www/mydomain/marketing/app/console mautic:segments:update > /dev/null 2>&1[/code][/quote]

I set all my cron job to 5 minutes too. It works well so far.

There is a recommendation in the documentation to stagger the firing of these crons so as they dont run concurrently. Hence i was wondering what the best way to stagger them?