# Again on cron "bin/console mautic:emails:send"

**URL:** <https://forum.mautic.org/t/again-on-cron-bin-console-mauticsend/27582>\
**Category:** Product Support\
**Created:** [March 31, 2023, 10:54pm UTC](https://forum.mautic.org/t/again-on-cron-bin-console-mauticsend/27582 "2023-03-31T22:54:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![star.aner](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/star.aner/32/9540_2.png) [@star.aner](https://forum.mautic.org/u/star.aner)\
**Post date:** [March 31, 2023, 10:54pm UTC](https://forum.mautic.org/t/again-on-cron-bin-console-mauticsend/27582/1 "2023-03-31T22:54:29Z")

</div>

**Software**  
My Mautic version is: 4.4.5  
My PHP version is: 7.4.33  
My Database type and version is: MySQL 5.7.39

**Problem**  
I have a problem with cron “bin/console mautic:emails:send”.  
I’m on Siteground, GoGeek plan, so the server is shared. Using my own SMTP server **I can send a maximum of 10 emails per second**. However, this check occurs every second, not every minute. That is, if I send more than 10 emails in one second the server stops sending emails. Unfortunately **it seems that Mautic/Symfony sends more than 10 emails per second** (is it right?). Indeed in the Mautic log files I find “_…received more than 10.7 messages for 1s_”.  
The only way I found to avoid this problem was to run the cron every minute and send 10 queued emails.  
But sending 10 emails in one minute isn’t exactly exciting!  
I tried to use the “–lock-name=[NAME]” option by running two identical crons with different names, but it doesn’t work because the crons still start at the same time and send emails at the same time.  
I’ve read about the possibility of creating a bash, but I find it a bit too complicated for me.

At the moment, my cron is this (and all work fine, but slowly…):  
`*/1 * * * * php /bin/console mautic:emails:send --message-limit=10 --time-limit=45`

Some idea?

Thanks.

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [April 1, 2023, 12:25pm UTC](https://forum.mautic.org/t/again-on-cron-bin-console-mauticsend/27582/2 "2023-04-01T12:25:02Z")

</div>

Thats also important for using Amazon SES… The limit is defined by the second.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [April 3, 2023, 3:42pm UTC](https://forum.mautic.org/t/again-on-cron-bin-console-mauticsend/27582/3 "2023-04-03T15:42:56Z")

</div>

How fast are you sending 10 messages now? under 1 sec?

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [April 4, 2023, 7:49am UTC](https://forum.mautic.org/t/again-on-cron-bin-console-mauticsend/27582/4 "2023-04-04T07:49:51Z")

</div>

Not sure how I can measure it on either Mautic (send) or AWS (receive). Probably my servers are not too fast yet, but I could imagine to hit this limit when using API?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [April 4, 2023, 8:01am UTC](https://forum.mautic.org/t/again-on-cron-bin-console-mauticsend/27582/5 "2023-04-04T08:01:06Z")

</div>

You can just run the command and count the seconds.

---

<div class="post-metadata">

**Author:** ![star.aner](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/star.aner/32/9540_2.png) [@star.aner](https://forum.mautic.org/u/star.aner)\
**Post date:** [April 5, 2023, 4:00pm UTC](https://forum.mautic.org/t/again-on-cron-bin-console-mauticsend/27582/6 "2023-04-05T16:00:23Z")

</div>

Hello, joeyk…  
I’ve read many af your posts here and some videos on [joeykeller.com](http://joeykeller.com). In one of your post I’ve read the possiblity to create a linux job/bash with a random timer… but that solution seems to be too complicated for me… ☹  
Anyway, in my case my server (SiteGround) send more than 10 emails per second and Mautic, in the “log” folder", creates some big log file (for example “prod-2023-03-31.php” is about 50MB).  
Do you think is there some solution for my problem?  
Can I do some test?

Thanks.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [April 6, 2023, 4:25am UTC](https://forum.mautic.org/t/again-on-cron-bin-console-mauticsend/27582/7 "2023-04-06T04:25:09Z")

</div>

Hi,  
You can always test how long it takes to send 10 emails:  
execute this in the Mautic folder if your spool is not empty:

`bin/console mautic:emails:send --message-limit=10`

Just count the seconds how long it takes to send the 10 emails.  
You can also set this cron which waits between 2 sends and only runs for 60 sec:

`bin/console mautic:emails:send --message-limit=10 & sleep 10 & bin/console mautic:emails:send --message-limit=10 & sleep 10 & bin/console mautic:emails:send --message-limit=10`

(use the right path)

If you run this command, then you’ll send 10 emails, wait 10 sec, send again, etc.

Let me know.
