Mautic Community Forums

How to limit quantity of messages sent per 24 hours period?

Your software
My Mautic version is:3.1.1
My PHP version is:73.

Your problem
This is my objective:

  • Have a campaign created from a segment with 300 contacts in it
  • Send 100 messages per day for a total sending time of 72 hours
  • Emails are paced to be sent with a delay between emails like this:

2,5,8,10,13,15,17,20,22,24,27,31,35,38,42,45,48,50,53,57 * * * * php /var/www/html/mautic/bin/console mautic:emails:send >/dev/null 2>&1

My settings are:

How should email be handled?
Queue
Message limit for queue processing
1

I’m aware there is a limit I can append to cron, but on what command and what is the syntax for this? And is this even possible?

is there a reason for the specific minutes of the hour you are sending?
and would you be interested in only sending during daylight times, I would do a send of 20 mails per hour for a period of 5 hours

you could do the following
*/3 9 * * * php /var/www/html/mautic/bin/console mautic:emails:send
*/3 9 * * * php /var/www/html/mautic/bin/console mautic:broadcasts:send
*/3 10 * * * php /var/www/html/mautic/bin/console mautic:emails:send
*/3 10 * * * php /var/www/html/mautic/bin/console mautic:broadcasts:send
*/3 11 * * * php /var/www/html/mautic/bin/console mautic:emails:send
*/3 11 * * * php /var/www/html/mautic/bin/console mautic:broadcasts:send
*/3 12 * * * php /var/www/html/mautic/bin/console mautic:emails:send
*/3 12 * * * php /var/www/html/mautic/bin/console mautic:broadcasts:send
*/3 13 * * * php /var/www/html/mautic/bin/console mautic:emails:send
*/3 13 * * * php /var/www/html/mautic/bin/console mautic:broadcasts:send

Keep the limit for queueing set to 1, this will send out 20 mails per hour for 5 hours from 9am to 1pm regulating in 100 mails per day.

The reason for specific minutes is not to get nailed by Gsuite for sending with an automated tool, so I created these “randomish” intervals, I might use SystemD later if I can get it working…

I’m looking for a “set and let it run” option, someone told me that with Lemlist, you can have a whole bunch of campaigns all over the place, and you set your whole install to send more than say 300 emails a day, and it limits the sending per 24 hours, gmass has that option also, Yamm and others, attaching screen captures to explain better.

So basically, I’m looking for an option to limit all emails from my Mautic install, across multiple campaigns and segments, like MAX Daily setting.

Could something similar to this work?

2,5,8,10,13,15,17,20,22,24,27,31,35,38,42,45,48,50,53,57 * * * * php /var/www/html/mautic/bin/console mautic:emails:send -limit=300 >/dev/null 2>&1