Sending emails from queue

Hi, how are you?



I’m contacting you directly because I wanted to talk with a specialist from the Mautic community. I opened a conversation about two weeks ago, but haven’t received any comments about it. Could you help me with this issue? Or at least guide me somehow?



Link for Opened Conversation:

https://www.mautic.org/community/index.php//8686-sending-emails-from-queue



Thanks, Carlos.

Hi, how are you?

I’m contacting you directly because I wanted to talk with a specialist from the Mautic community. I opened a conversation about two weeks ago, but haven’t received any comments about it. Could you help me with this issue? Or at least guide me somehow?

Link for Opened Conversation:
https://www.mautic.org/community/index.php//8686-sending-emails-from-queue

Thanks, Carlos.

Thank you for your fast response. Will read all details from the URL you sent me (https://github.com/mautic/mautic/issues/1740). Would it be too much to ask you to verify if our cron jobs are correctly configured?

crontab file:

# mautic cron jobs
# keep the segments current
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * root php /var/www/mautic/app/console mautic:segments:update --no-interaction --no-ansi >> /var/www/mautic/app/logs/cron-logs/seg-update.log 2>&1

# execute campaigns events
1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * root php /var/www/mautic/app/console mautic:campaigns:trigger --no-interaction --no-ansi >> /var/www/mautic/app/logs/cron-logs/cam-trigger.log 2>&1

# keep campaigns updated with applicable contacts
2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59  * * * * root php /var/www/mautic/app/console mautic:campaigns:rebuild --no-interaction --no-ansi >> /var/www/mautic/app/logs/cron-logs/cam-rebuild.log 2>&1

# update maxmind geolite2 IP database
00 01 * * *         root php /var/www/mautic/app/console mautic:iplookup:download --no-interaction --no-ansi > /var/www/mautic/app/logs/cron-logs/ip-lookup.log 2>&1

# fetch and process monitored email
00 07 * * *         root php /var/www/mautic/app/console mautic:email:fetch

# segment (broadcast) emails
*/5 * * * *         root php /var/www/mautic/app/console mautic:broadcasts:send --no-interaction --no-ansi >> /var/www/mautic/app/logs/cron-logs/schedule-emails.log 2>&1

And we have a custom script which runs an infinite loop executing the mautic:emails:send command:

mautic-emails-send.sh

#!/bin/bash
while true
do
          start_time=`date +%s`
          php /var/www/mautic/app/console mautic:emails:send
          end_time=`date +%s`
          echo Execution time was `expr $end_time - $start_time` s.
          sleep 2 
done

How can I do that? It’s different for every OS, the paths are unique to every server.

I just wanted to check with you if the cron jobs are correctly configured in terms of time of execution between them (keep the segments current, execute campaigns events, keep campaigns updated with applicable contacts, …) and if there is a problem if I run a custom script which runs an infinite loop executing the mautic:emails:send command. That’s basically what I was asking. Thank you!