Mautic plugin for setting the timing (hours of the day, days of the week, etc) for when to trigger campaign events.
The ThirdSetMauticTimingBundle is a Mautic plugin that allows you to set a cron timing expression on any Campaign action event (such as a "Send Email" action).
For example, you could add a cron expression that only allows sending on weekdays during working hours in New York.
This plugin works on Mautic 2.x, Mautic 3.x and Mautic 4.x. It should work on most versions of PHP.
This plugin has been tested with up to Mautic v4.3.1.
This plugin has been tested with up to Mautic v3.2.1.
This plugin has been tested with up to Mautic v2.16.0.
This plugin has been tested with up to PHP v7.4.29.
/plugins
folder.var/cache/prod
for Mautic 3.x+ and app/cache/prod
for Mautic 2.x).php bin/console doctrine:schema:update --dump-sql
php bin/console doctrine:schema:update --force
Note: For Mautic 2.x, replace php bin/console
with php app/console
in the above commands.
After installing the plugin, you will now see a new Timing section when adding or editing Campaign actions.
The expression field allows you to enter a cron expression for the timing to be evaluated against. See the Wikipedia Cron Page for a good overview of cron syntax.
Note that it is best to use ranges (ex: "1-5") instead of exact values. This is because the expression is evaluated when the campaign is triggered and when that happens is external to this plugin.
Example:
* 09-17 * * 1-5
(Weekdays, 9AM to 5PM)
When this field is enabled, the plugin will evaluate the cron expression off of the Contact's time zone. This allows you to only send emails during the Contact's working hours.
The contact time zone is evaluated in the following order:
mautic.lead.field.timezone
) (Mautic > 2.6.1), else:Time Zone Field
in the action, else:If a time zone is specified in this field, the cron expression will evaluate against the selected time zone. This allows you to do things such as only sending emails during your working hours.
If you've enabled the "Use Contact's Time Zone" field, the contact's time zone would be used instead of this field (unless the Contact's time zone is unknown in which case the plugin will fall back to the time zone specified here).
This plugin includes a suite of unit tests. You will need to have PHPUnit installed in order to run the tests.
apk update && apk add ca-certificates && update-ca-certificates && apk add openssl
/usr/bin/wget https://phar.phpunit.de/phpunit.phar -O /usr/bin/phpunit && chmod 755 /usr/bin/phpunit
curl https://phar.phpunit.de/phpunit.phar -L -o /usr/bin/phpunit && chmod 755 /usr/bin/phpunit
Change directories into the plugin dir (cd plugins/ThirdSetMauticTimingBundle
) and then run:
phpunit
Or for older versions of Mautic (<4.0), run:
phpunit --bootstrap ../../app/autoload.php
This plugin is developed and maintained by Third Set Productions the makers of AdPlugg.
This plugin is licensed under GPLv3.
The GPL clearly explains that there is no warranty for this free software. Please see the included license.txt file for details.