Skip to content

Instantly share code, notes, and snippets.

@Basilakis
Forked from heathdutton/cloudways-mautic.sh
Last active February 27, 2020 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Basilakis/aa9d4f02e2d9853422e3a45f51c433d6 to your computer and use it in GitHub Desktop.
Save Basilakis/aa9d4f02e2d9853422e3a45f51c433d6 to your computer and use it in GitHub Desktop.
Recommended cron tasks for Mautic 2 in Cloudways.
# Recommended cron tasks for Mautic 2 in Cloudways.
# All tasks are ran as www-data
# Output is ignored to avoid log file overhead.
# --quiet is used to reduce MySQL overhead on some tasks.
# --max-contacts is used to prevent one object's backlog from locking updates for other object.
# SEGMENTS
# Update all segments.
*/5 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:segments:update --max-contacts=10000 --quiet >/dev/null 2>&1
# CAMPAIGNS
# Update campaigns with new contacts from forms and segments.
*/5 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:campaigns:rebuild --max-contacts=5000 --batch-limit=500 --quiet >/dev/null 2>&1
# Trigger campaign events in separate batches so they can be scaled to your need, with a priority on kickoff events.
* * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:campaigns:trigger --kickoff-only --max-contacts=5000 --batch-limit=250 --quiet >/dev/null 2>&1
*/5 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:campaigns:trigger --scheduled-only --max-contacts=5000 --batch-limit=250 --quiet >/dev/null 2>&1
*/10 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:campaigns:trigger --inactive-only --max-contacts=5000 --batch-limit=250 --quiet >/dev/null 2>&1
# Trigger timed events for published campaigns.
*/10 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:campaigns:messages --quiet >/dev/null 2>&1
# EMAIL
# Process sending of messages queue.
* * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:emails:send --quiet >/dev/null 2>&1
# Fetch email.
*/5 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:emails:fetch --quiet >/dev/null 2>&1
# BROADCASTS
# Send a channel broadcast to pending contacts.
*/10 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:broadcasts:send --quiet >/dev/null 2>&1
# SOCIAL
# Looks at the records of monitors and iterates through them.
*/20 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:social:monitoring --quiet >/dev/null 2>&1
# WEBHOOKS
# Process queued webhook payloads
* * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:webhooks:process --quiet >/dev/null 2>&1
# IMPORTS
# Process import files offline.
*/5 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:import --quiet >/dev/null 2>&1
# UPGRADES
# Run migrations to recover from partial upgrades.
25 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console doctrine:migrations:migrate --no-interaction --quiet >/dev/null 2>&1
30 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:plugins:reload --no-interaction --quiet >/dev/null 2>&1
# IP LOOKUP
# Update IP lookup database monthly.
0 9 * * 2 [ `date +\%d` -le 7 ] && php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:iplookup:download >/dev/null 2>&1
# GDPR COMPLIANCE
# Flush contacts that have not been updated in 3 years that are from the EU.
30 0 1 * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:maintenance:cleanup --years-old=3 --gdpr >/dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment