Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 * * * * www-data php applications/mautic/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 * * * * www-data php applications/mautic/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.
* * * * * www-data php applications/mautic/public_html/app/console mautic:campaigns:trigger --kickoff-only --max-contacts=5000 --batch-limit=250 --quiet >/dev/null 2>&1
*/5 * * * * www-data php applications/mautic/public_html/app/console mautic:campaigns:trigger --scheduled-only --max-contacts=5000 --batch-limit=250 --quiet >/dev/null 2>&1
*/10 * * * * www-data php applications/mautic/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 * * * * www-data php applications/mautic/public_html/app/console mautic:campaigns:messages --quiet >/dev/null 2>&1
# EMAIL
# Process sending of messages queue.
* * * * * www-data php applications/mautic/public_html/app/console mautic:emails:send --quiet >/dev/null 2>&1
# Fetch email.
*/5 * * * * www-data php applications/mautic/public_html/app/console mautic:emails:fetch --quiet >/dev/null 2>&1
# BROADCASTS
# Send a channel broadcast to pending contacts.
*/10 * * * * www-data php applications/mautic/public_html/app/console mautic:broadcasts:send --quiet >/dev/null 2>&1
# SOCIAL
# Looks at the records of monitors and iterates through them.
*/20 * * * * www-data php applications/mautic/public_html/app/console mautic:social:monitoring --quiet >/dev/null 2>&1
# WEBHOOKS
# Process queued webhook payloads
* * * * * www-data php applications/mautic/public_html/app/console mautic:webhooks:process --quiet >/dev/null 2>&1
# IMPORTS
# Process import files offline.
*/5 * * * * www-data php applications/mautic/public_html/app/console mautic:import --quiet >/dev/null 2>&1
# UPGRADES
# Run migrations to recover from partial upgrades.
25 * * * * www-data php applications/mautic/public_html/app/console doctrine:migrations:migrate --no-interaction --quiet >/dev/null 2>&1
30 * * * * www-data php applications/mautic/public_html/app/console mautic:plugins:reload --no-interaction --quiet >/dev/null 2>&1
# IP LOOKUP
# Update IP lookup database monthly.
0 9 * * 2 www-data [ `date +\%d` -le 7 ] && php applications/mautic/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 * * www-data php applications/mautic/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
You can’t perform that action at this time.