# Scheduled emails not sent

**URL:** <https://forum.mautic.org/t/scheduled-emails-not-sent/17588>\
**Category:** Mautic 3 - Install/Upgrade Support\
**Created:** [December 28, 2020, 6:08pm UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588 "2020-12-28T18:08:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 28, 2020, 6:08pm UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/1 "2020-12-28T18:08:28Z")

</div>

I’m having issues with sending scheduled emails. Ever since I changed in email setting from “immidiately” to “queu” emails are said to be sent in mautic but they are not. I checked all 15 of my email addresses in segment. What could be the reason fro this? Cron jobs?

These are mine:  
1 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:segments:update” #mautic-segments-cron  
1 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:campaigns:rebuild” #mautic-campaings-rebuild-cron  
1 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:campaigns:trigger” #mautic-campaigns-trigger-cron  
1 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:emails:send” #mautic-email-send-cron  
1 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:webhooks:process” #mautic-webhooks-cron

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 28, 2020, 7:45pm UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/2 "2020-12-28T19:45:09Z")

</div>

Is there anyone here who can help me?

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [December 28, 2020, 11:22pm UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/3 "2020-12-28T23:22:15Z")

</div>

You skipped all the stuff we need to help. There is a reason that new “Support” posts ask for all this info.  
What version of Mautic are you running?  
What PHP?  
What SQL server and version

What do the logs say. Click the gear in top right corner of your mautic install, click system info, click logs and copy/paste that .

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 28, 2020, 11:48pm UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/4 "2020-12-28T23:48:56Z")

</div>

Hi @EJL, thanks for the reply.

Mautic newest version 3.2.2  
PHP Version 7.3.25  
sql 8.0.22

Today’s Mautic error log is empty. Check server error log for error messages Mautic didn’t have a chance to catch.

What’s next?

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [December 28, 2020, 11:54pm UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/5 "2020-12-28T23:54:35Z")

</div>

open mauticdirectory/app/config/local.php and set debug to true.  
look in mautic/var/log and see what those logs say.  
check spool folder to see if there is anything waiting to send.  
Are you running on bitnami or another similar cloud provider?  
Crons testing ok? whats the output when you run them via SSH with -vvv

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [December 28, 2020, 11:59pm UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/6 "2020-12-28T23:59:57Z")

</div>

> [@tarik123](#):
>
> 1 \* \* \* \*

You should be running your cron in different minutes.

Try this settings:

```auto
# Update Mautic Segments every 15 minutes
# E.g 12:00, 12:15, 12:30, 12:45...
*/15 * * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:segments:update" >/dev/null 2>&1

# Update Mautic Campaigns every 15 minutes starting with an offset of 5 minutes
# E.g 12:05, 12:20, 12:35, 12:50
5,20,35,50 * * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:campaigns:update" >/dev/null 2>&1

# Trigger Mautic Campaigns Events every 15 minutes with an offset of 10 minutes
# E.g 12:10, 12:25, 12:40, 12:55
10,25,40,55 * * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:campaigns:trigger" > /dev/null

# Push out email queues
# E.g 12:03, 12:18, 12:33, 12: 48
3-59/15 * * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:emails:send" > /dev/null

# Clean up unused data if it is older than 60 days
# We check this every 12 hours
0 */12 * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:maintenance:cleanup" --days-old=60 --no-interaction

```

If all of this didn’t work, you can try running directly via your console, in my case, I did this:

```auto
user@mautic:~$ sudo php7.2 /var/www/mautic/bin/console mautic:campaigns:update
Rebuilding contacts for campaign 1
0 total contact(s) to be added in batches of 300
0 total contact(s) to be removed in batches of 300

```

So, in your case, you might do:

```auto
su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:segments:update"

```

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 29, 2020, 12:01am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/7 "2020-12-29T00:01:41Z")

</div>

I’m running on Google cloud servers.Thats how I installed this, with just a few clicks. I’m not very familiar with commands 🙂  
Can you help me with that?

I edited crontabs recently:  
0,15,30,45 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:segments:update” #mautic-segments-cron  
5,20,35,50 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:campaigns:rebuild” #mautic-campaings-rebuild-cron  
10,25,40,55 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:campaigns:trigger” #mautic-campaigns-trigger-cron  
1 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:emails:send” #mautic-email-send-cron  
1 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:webhooks:process” #mautic-webhooks-cron

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 29, 2020, 12:04am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/8 "2020-12-29T00:04:51Z")

</div>

Rebuilding contacts for segment 2  
0 total contact(s) to be added in batches of 300  
0 total contact(s) to be removed in batches of 300  
0 contact(s) affected  
Rebuilding contacts for segment 1  
0 total contact(s) to be added in batches of 300  
0 total contact(s) to be removed in batches of 300  
0 contact(s) affected

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 29, 2020, 12:09am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/9 "2020-12-29T00:09:49Z")

</div>

Honestly I didn’t expect it will be this hard to set up server and fix all kinds of errors to send emails. When sending emails immidiately it works. When I switch to queue it doesn’t work. 1 h ago I sent email to 15 of my emails and I only got one so far. What happened to other 14? I need to adjust the sending speed to match the one AWS SES gave me - 1emails/sec.

How can I monitor cron job and see if its executing in the time frame I set it up for. What else can we do? Can you send me some commads and I will give you the results?

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 29, 2020, 12:12am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/10 "2020-12-29T00:12:37Z")

</div>

I deleted my old cron jobs and now I’m using the ones you sent me.

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 29, 2020, 12:16am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/11 "2020-12-29T00:16:35Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/7/781abd9045118b6e3d0c1cf5b495f70da95eace6.png)

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 29, 2020, 12:19am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/12 "2020-12-29T00:19:28Z")

</div>

Just tried sending segment email to 15 addresses, mautic says its sent but they are not. I checked all 15 of them.

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [December 29, 2020, 12:21am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/13 "2020-12-29T00:21:45Z")

</div>

> [@tarik123](#):
>
> Honestly I didn’t expect it will be this hard to set up server and fix all kinds of errors to send emails. When sending emails immidiately it works. When I switch to queue it doesn’t work. 1 h ago I sent email to 15 of my emails and I only got one so far. What happened to other 14? I need to adjust the sending speed to match the one AWS SES gave me - 1emails/sec.

Yeah,I get. The advantage of the queue is that you can send larger emails.

> [@tarik123](#):
>
> How can I monitor cron job and see if its executing in the time frame I set it up for. What else can we do? Can you send me some commads and I will give you the results?

Using systems, you can see your cron logs like so `sudo journalctl -u cron`

or You can log the cron job in a specified location:

```auto
*/15 * * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:segments:update" >> /var/log/mauticCron.log 2>&1

```

This would put all your cron logs under /var/log/mauticCron.log

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [December 29, 2020, 12:23am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/14 "2020-12-29T00:23:32Z")

</div>

Could be the cron hasn’t run, wait for few minutes. You should only use the queue methods if you are sending a large amount of emails.

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 29, 2020, 12:31am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/15 "2020-12-29T00:31:28Z")

</div>

What’s the large amount of emails? 1000? What if I want to send 500 emails? All of them would be sent at once and I would be probably banned by AWS since it would exceed 1 email/sec. I’m doing this for a couple of days and honestly its the most frustrating 4-5 days in my life.

Help me troubleshoot spool and other things you mentioned.

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [December 29, 2020, 12:39am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/16 "2020-12-29T00:39:44Z")

</div>

![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/5/5c97be0d20a019e13dd07e4e769a9e2276709619.png)

Shows you have 2 email limit for queue processing. Take that and multiply how many minutes between crons and you will see how quickly you send 15 emails.

Search the forum to see how to throttle email sends using queue and crons.

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 29, 2020, 12:45am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/17 "2020-12-29T00:45:44Z")

</div>

Ok, I will work on that. Does it matter that mautic says the emails are sent even though they aren’t? Right now I have created 4,5 segment emails and sent all of them. It says that all of them are sent but I only got few of them. What confuses me is exactly that: Mautic says they are sent but thats not true. Help me understand.

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [December 29, 2020, 12:51am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/18 "2020-12-29T00:51:47Z")

</div>

They appear sent as far as mautic is concerned because the messages are created in spool and will delivered via cron process.

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 29, 2020, 12:54am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/19 "2020-12-29T00:54:15Z")

</div>

sudo journalctl -u cron, this one works but for the bottom one I get log permission denied  
This is from first command:

sudo journalctl -u cron  
– Logs begin at Tue 2020-12-29 00:13:05 UTC, end at Tue 2020-12-29 00:54:01 UTC. –  
Dec 29 00:13:06 debian systemd[1]: Started Regular background program processing daemon.  
Dec 29 00:13:06 debian cron[324]: (CRON) INFO (pidfile fd = 3)  
Dec 29 00:13:06 debian cron[324]: (CRON) INFO (Running @reboot jobs)  
Dec 29 00:13:08 mautic-1-vm systemd[1]: Stopping Regular background program processing daemon…  
Dec 29 00:13:08 mautic-1-vm systemd[1]: cron.service: Main process exited, code=killed, status=15/TERM  
Dec 29 00:13:08 mautic-1-vm systemd[1]: cron.service: Succeeded.  
Dec 29 00:13:08 mautic-1-vm systemd[1]: Stopped Regular background program processing daemon.  
Dec 29 00:13:08 mautic-1-vm systemd[1]: Started Regular background program processing daemon.  
Dec 29 00:13:08 mautic-1-vm cron[640]: (CRON) INFO (pidfile fd = 3)  
Dec 29 00:13:08 mautic-1-vm cron[640]: (CRON) INFO (Skipping @reboot jobs – not system startup)  
Dec 29 00:15:01 mautic-1-vm CRON[1678]: pam\_unix(cron:session): session opened for user root by (uid=0)  
Dec 29 00:15:01 mautic-1-vm CRON[1679]: (root) CMD (su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitna  
Dec 29 00:15:01 mautic-1-vm su[1680]: (to daemon) root on none  
Dec 29 00:15:01 mautic-1-vm su[1680]: pam\_unix(su:session): session opened for user daemon by (uid=0)  
Dec 29 00:15:02 mautic-1-vm su[1680]: pam\_unix(su:session): session closed for user daemon  
Dec 29 00:15:02 mautic-1-vm CRON[1678]: pam\_unix(cron:session): session closed for user root  
Dec 29 00:17:01 mautic-1-vm CRON[1718]: pam\_unix(cron:session): session opened for user root by (uid=0)  
Dec 29 00:17:01 mautic-1-vm CRON[1719]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)  
Dec 29 00:17:01 mautic-1-vm CRON[1718]: pam\_unix(cron:session): session closed for user root  
Dec 29 00:18:01 mautic-1-vm CRON[1723]: pam\_unix(cron:session): session opened for user root by (uid=0)  
Dec 29 00:18:01 mautic-1-vm CRON[1724]: (root) CMD (su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitna  
Dec 29 00:18:01 mautic-1-vm su[1725]: (to daemon) root on none  
Dec 29 00:18:01 mautic-1-vm su[1725]: pam\_unix(su:session): session opened for user daemon by (uid=0)  
Dec 29 00:18:03 mautic-1-vm CRON[1723]: pam\_unix(cron:session): session closed for user root  
Dec 29 00:20:01 mautic-1-vm CRON[1753]: pam\_unix(cron:session): session opened for user root by (uid=0)  
Dec 29 00:20:01 mautic-1-vm CRON[1754]: (root) CMD (su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitna  
Dec 29 00:20:01 mautic-1-vm su[1755]: (to daemon) root on none  
Dec 29 00:20:01 mautic-1-vm su[1755]: pam\_unix(su:session): session opened for user daemon by (uid=0)  
Dec 29 00:20:01 mautic-1-vm su[1755]: pam\_unix(su:session): session closed for user daemon  
Dec 29 00:20:01 mautic-1-vm CRON[1753]: pam\_unix(cron:session): session closed for user root  
Dec 29 00:25:01 mautic-1-vm CRON[1787]: pam\_unix(cron:session): session opened for user root by (uid=0)  
Dec 29 00:25:01 mautic-1-vm CRON[1788]: (root) CMD (su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitna  
Dec 29 00:25:01 mautic-1-vm su[1789]: (to daemon) root on none  
Dec 29 00:25:01 mautic-1-vm su[1789]: pam\_unix(su:session): session opened for user daemon by (uid=0)  
Dec 29 00:25:02 mautic-1-vm su[1789]: pam\_unix(su:session): session closed for user daemon  
Dec 29 00:25:02 mautic-1-vm CRON[1787]: pam\_unix(cron:session): session closed for user root  
Dec 29 00:30:01 mautic-1-vm CRON[1822]: pam\_unix(cron:session): session opened for user root by (uid=0)  
Dec 29 00:30:01 mautic-1-vm CRON[1823]: (root) CMD (su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitna  
Dec 29 00:30:01 mautic-1-vm su[1824]: (to daemon) root on none

---

<div class="post-metadata">

**Author:** ![tarik123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tarik123/32/4153_2.png) [@tarik123](https://forum.mautic.org/u/tarik123)\
**Post date:** [December 29, 2020, 12:57am UTC](https://forum.mautic.org/t/scheduled-emails-not-sent/17588/20 "2020-12-29T00:57:44Z")

</div>

Anyway bro, THANK YOU so much for your help, I don’t want to bother you anymore today. I will let you know tommorow what happened with those emails and if they are delivered at all. I hope everything works out otherwise I don’t have much patience nor nerves left for this. I think this is too much for me. It’s so annoying that it hurts 🙂

[Next page](https://forum.mautic.org/t/scheduled-emails-not-sent/17588.md?page=2)
