Mautic Community Forums

Sending campaign emails during specific hours

I apologize in advance if this is a duplicate request.



Something I liked about Mailchimp was the “only send between X and Y time” feature. It also allowed for this functionality to match the user’s local time zone, if their location was known.



This is nice because a user might signup at say 11:00 p.m. their time, but then we could specify if we want our follow-up emails sent during the day (say between 10:00 am - 3:00 pm) moving forward.



At some point this would be a nice add-on to existing campaign functionality (and possibly also for scheduled list blast emails).

Hi! I’m about to get the paid version :slight_smile:
But I need to know how to send emails campaings only between some days in the week.

For example:
send emails, excepts on sundays, or only in mondays.

This is very usefull to “notification system” for webinars.

How can I do it?

Thanks in advance
Igor Medeiros

You can use a couple of approaches:

  1. This works if you trigger all your campaigns by id: You can control your schedules by creating a campaign, and scheduling a cron job to run that specific campaign on certain times, example:
00 11,15 * * 1-5  php /var/www/html/mautic/app/console mautic:campaign:trigger --campaign-id =5 --env=prod  

runs twice at 11am and 3pm, Monday - Friday.

  1. If you wild-card trigger your campaigns, then publish the campaign a given time, then unpublish it. You’ll need a cron job and a db-update script.

I think option 1 is better, it’s a good practice to trigger campaigns specifically by ID rather than running campaigns:trigger for all campaigns at the same time. You can group your campaigns that serve specific functions into batch files, then schedule the batch (shell) files to fire them through the assigned time-slots. Edit your batch files as needed to manage it all.

I apologize in advance if this is a duplicate request.

Something I liked about Mailchimp was the “only send between X and Y time” feature. It also allowed for this functionality to match the user’s local time zone, if their location was known.

This is nice because a user might signup at say 11:00 p.m. their time, but then we could specify if we want our follow-up emails sent during the day (say between 10:00 am - 3:00 pm) moving forward.

At some point this would be a nice add-on to existing campaign functionality (and possibly also for scheduled list blast emails).

@balkee Thanks for this. May work and is by far nothing, a usual user can or would like to do :wink:

I’d also love to see this in the backend. Even a general system-wide setting that doesn’t allow mail delivery at certain times.

We created a Mautic plugin that will do this. You can read more about it and get it here:

https://github.com/thirdset/ThirdSetMauticTimingBundle