How do you schedule broadcast emails in mautic? I can't find it

I do run v2.15.3 but I just don’t see how do you schedule broadcast, I only see option of sending it now.

Hi @evan1

In order to send a Broadcast Email, you need two things:

  1. Set a Published Date
  2. Set up the right cron job

As mentioned first, you want to set a Published Date like in the screenshot below:

Screenshot 2020-01-31 at 19.06.16

The second thing is writing the right cron jobs to trigger at regular intervals.

In this case, you want to be sure you have mautic:emails:send and mautic:broadcasts:send to run every X minutes.

I don’t remember if emails:send is mandatory but this is how my own instance is set and it’s been working so far.

Once you have done these two things, the status of your Broadcast Emails should show as “Pending” with an orange clock next to them until the Published date is reached, which will then publish the email and wait for the next broadcasts:send cron job to run to send the pending emails.

Hope that helps,

Yaniss

3 Likes

This might be a bit confusing, because you need to set it to “Published” although the selection below says “Publish it at that date”. My first thought is to keep it unpublished and it will change it’s status once the cron runs, but this is not the case.

Cron [emails:send] seems to be required only if you have you emails set to queue
There are some additional options for the [broadcasts:send] command, such as " --channel=email --id=X" More info here:

Yes @voymacao you are correct, and you make a very good point.

For a segment email to be sent, Published should be set to “Yes”, and a Publish at date at the point in time you want it to deploy in the future should be set.

The Unpublish at option is also helpful, as the email will continue to be deployed to the contacts in the segment (including newly added contacts) who have not yet received it, until the Unpublish at date/time is reached.

It is usually best to specify the broadcasts:send cron job without any flags, because by default you want all of the published segment emails that have passed their Publish at date/time to be triggered, (queued if email queuing is on), and deployed.

Just a question about cron, I’ve found multiple commands around, so which one is the correct one?

my mautic path/app/console mautic:broadcasts:send
or
my mautic path//bin/console mautic:broadcasts:send

Shall I set it to every 10 minutes?

I don’t see the orange clock next to my broadcast email, so I’m assuming something isn’t right.

Here is a complete summary for you:

1 Like

Thank you, that was interesting, however, it doesn’t answer part of my question,

I have the following cron setup now:

@hourly cd /my mautic path/usr/bin/console mautic:broadcasts:send

@hourly cd /my mautic path/usr/bin/console mautic:emails:send

@hourly cd /my mautic path/usr/bin/console mautic:campaign:trigger

Just wondering if the “hourly” trigger is ok for these to work properly?

I’ve scheduled my email to be sent out later on, and got the orange clock in the list view, and the same message on your video popped up, but my “mautic/var/spool” folder is empty atm.

The queue settings within config are the same as yours in the video.

Hi, if you scheduled for the future and the orange clock is there, then

@hourly cd /my mautic path/usr/bin/console mautic:broadcasts:send
Will place your emails in the queue every hour

@hourly cd /my mautic path/usr/bin/console mautic:emails:send
Will send out the emails from the queue every hour. There will be an overlap with the broadcast command, so the emails will actually go out one hour after the broadcast ran.

You are asking if this is fine.
Well I’m tunning cron every minute, waiting 2 hours to get emails out is a bit slow for me, but maybe it’s perfect for you.

ok thank you, well actually I’m just trying to figure this out based on requirements.

Just wondered if that affects in any way other than time overlap the sending of emails and the commands I’ve listed are correct.

So basically if I see the orange clock there in the list view, that means it should work?

Hi,

If you have the orange clock, that means, your emails will go out at a future date for the segment members.

(If you forget to close the publishing window, then as long as people join the segment will get the old emails as well.)

If you have the red clock, it means the email ‘expired’ won’t go out anymore.

Once the orange clock turns green button the following 2 steps will happen:

  1. broadcast command will push the emails into your spool folder
  2. email send command will send them out from the spool folder

Joey

2 Likes

Looks like it didn’t work though, it should’ve been going out already today, however, the orange clock is gone, and the emails are still listed as pending.

Any suggestions?

Check spool. Any files in there?

I’ve checked, my mautic/var/spool folder, no files in sight

any idea why it doesn’t work? Maybe should be more time in the future? Something’s wrong with cron commands?

Can you run your command manually?
You will see what the problem is.

How can I run the command manually though?

Log in via ssh and execute the command. If you can’t then drop me a message, I’ll help you.

Hi Joey,

Is there a UI indicator that shows when all the queued up emails are sent? Once the clock turns green, it shows “X Pending”. After broadcast command run, it shows “X Sent” (although they are just queued). I would like to know when all messages are actually sent without looking into the spool directory.

Thank you,
Yev

Hello,
No. But there used to be a plugin, not sure it works:

This is the plugin we are using, it is more recently updated and I can confirm working with 4.x: