Advanced cronjob

@joeyk I am reading on your website about advance cron jobs since I am using Amazon SES API and we are limited to something like 14 email per second … Here the URL I am reading on your site - https://joeykeller.com/knowledge-base-2/mautic-admin-guides/advanced-cronjobs-guide-for-mautic/

I got some question … The bottom of page “batch cronjob” which you wrote is a standard ideal for Amazon SES 14 email per/sec rule?

Do we create a new file example mautictasks then edit in file /bin/mautictasks

php console mautic:broadcasts:send --limit=150
php console mautic:emails:send --message-limit=150
php console mautic:campaigns:rebuild --batch-limit=300
php console mautic:segment:update --batch-limit=900
php console mautic:campaigns:trigger
php console mautic:import --limit=500
php console mautic:webhooks:process
php console mautic:reports:scheduler

Add to every minute cron job something like this

* * * * * /home/username/public_html/bin/mautictasks >/dev/null 2>&1

We need to set in email configuration to queue at about 800 per minutes correct?

Is that the be best method to set up for Amazon 14 email per second?

Thank you for tutorial but wanted to confirm if I am reading your tutorial correctly.

It worked a couple of times then it stop working … Here the terminal result

/bin/mautictasks
Could not open input file: console
Could not open input file: console
Could not open input file: console
Could not open input file: console
Could not open input file: console
Could not open input file: console
Could not open input file: console
Could not open input file: console

I think I fixed that one by adding full path to console …

Hi,
Glad you figured it out.

standard ideal for Amazon SES 14 email per/sec rule?

It depends on your server speed. This setting works on an average server, and will send out 150 emails / minute.
But at the same time it will also process 150 emails to place in the queue, rebuild campaigns and segments. It has to be able to do all under 1 minute, otherwise your cronjobs will pile up, and your server will crash eventually.

Please run the command and time how long it takes to run it. If it’s under 1 minute, you are good to go. If it’s more, then adjust the settings.

1 Like

Thank you …

I did run it manually and it was completed in like 10 seconds … I only have 5,000 contacts and 8 segments so it’s not big. It’s an organization weekly newsletters or event announcements for our members.

It’s working … Cpanel for some reason require a full path like this

/usr/local/bin/php /home/yourusername/public_html/bin/console mautic:broadcasts:send