Last active
November 6, 2021 01:52
-
-
Save samjaninf/5c5901df503416ba9a62fa7087a5243c to your computer and use it in GitHub Desktop.
Full crons for mautic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Recommended cron tasks for Mautic 2 in Cloudways. | |
# All tasks are ran as ###USERTORUNAS### | |
# 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 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:segments:update --max-contacts=10000 --quiet >/dev/null 2>&1 | |
# CAMPAIGNS | |
# Update campaigns with new contacts from forms and segments. | |
*/5 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/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. | |
*/5 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:campaigns:update --max-contacts=5000 --batch-limit=250 --quiet >/dev/null 2>&1 | |
* * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:campaigns:trigger --kickoff-only --batch-limit=250 --quiet >/dev/null 2>&1 | |
*/5 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:campaigns:trigger --scheduled-only --batch-limit=250 --quiet >/dev/null 2>&1 | |
*/10 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:campaigns:trigger --inactive-only --batch-limit=250 --quiet >/dev/null 2>&1 | |
# Trigger timed events for published campaigns. | |
*/10 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:campaigns:messages --quiet >/dev/null 2>&1 | |
# Process sending of messages queue. | |
* * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:emails:send --quiet >/dev/null 2>&1 | |
# Fetch email. | |
*/5 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:emails:fetch --quiet >/dev/null 2>&1 | |
# BROADCASTS | |
# Send a channel broadcast to pending contacts. | |
*/10 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:broadcasts:send --quiet >/dev/null 2>&1 | |
# SOCIAL | |
# Looks at the records of monitors and iterates through them. | |
*/20 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:social:monitoring --quiet >/dev/null 2>&1 | |
# WEBHOOKS | |
# Process queued webhook payloads | |
* * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:webhooks:process --quiet >/dev/null 2>&1 | |
# IMPORTS | |
# Process import files offline. | |
*/5 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:import --quiet >/dev/null 2>&1 | |
# UPGRADES | |
# Run migrations to recover from partial upgrades. | |
25 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console doctrine:migrations:migrate --no-interaction --quiet >/dev/null 2>&1 | |
30 * * * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:plugins:reload --no-interaction --quiet >/dev/null 2>&1 | |
# IP LOOKUP | |
# Update IP lookup database monthly. | |
0 9 * * 2 ###USERTORUNAS### [ `date +\%d` -le 7 ] && ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:iplookup:download >/dev/null 2>&1 | |
0 9 * * 2 ###USERTORUNAS### [ `date +\%d` -le 7 ] && ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:donotsell:download >/dev/null 2>&1 | |
0 9 * * 2 ###USERTORUNAS### [ `date +\%d` -le 7 ] && ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:max-mind:purge >/dev/null 2>&1 | |
# GDPR COMPLIANCE | |
# Flush contacts that have not been updated in 3 years that are from the EU. | |
30 0 1 * * ###USERTORUNAS### ###PATHTOPHP### ###PATHTOMAUTICINSTALL###/bin/console mautic:maintenance:cleanup --gdpr >/dev/null 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment