To ensure Mautic runs efficiently and all tasks are automated properly, several cron jobs should be set up. Here’s a list of the essential and optional cron jobs:

Essential Cron Jobs

Segment Update

  • Purpose: Updates contact segments based on filters and criteria.
  • Command: mautic:segments:update

Campaign Rebuild

  • Purpose: Updates campaigns based on segment changes (required when segments are used in campaigns).
  • Command: mautic:campaigns:rebuild

Campaigns Trigger

  • Purpose: Triggers campaign events like sending emails, changing contact segments, etc.
  • Command: mautic:campaigns:trigger

Send Emails

  • Purpose: Sends queued emails (used if you’re sending emails via queue mode).
  • Command: mautic:emails:send

Fetch Emails

  • Purpose: Fetches and processes bounced emails and replies (used for bounce management).
  • Command: mautic:email:fetch

Import

  • Purpose: Processes contact imports (only necessary if you’re importing contacts via the Mautic UI).
  • Command: mautic:import

Update Lead Lists

  • Purpose: Updates lead lists (an older term, similar to segments, used in earlier versions of Mautic).
  • Command: mautic:leadlists:update

Optional Cron Jobs

Download IP Lookup

  • Purpose: Downloads the MaxMind GeoLite2 IP lookup database for geolocation.
  • Command: mautic:iplookup:download

Schedule Reports

  • Purpose: Sends scheduled reports to users.
  • Command: mautic:reports:scheduler

Send Broadcasts

  • Purpose: Sends scheduled marketing emails (broadcasts) to segments.
  • Command: mautic:broadcasts:send

Send Messages

  • Purpose: Sends web notifications and in-app messages.
  • Command: mautic:messages:send

Maintenance Cleanup

  • Purpose: Cleans up old or unused data in the database to optimize performance.
  • Command: mautic:maintenance:cleanup –days-old=365 –dry-run

Note: Remove –dry-run to execute the cleanup.

Generate Assets

  • Purpose: Generates the assets needed for landing pages and emails (useful if you modify assets like tracking pixels).
  • Command: mautic:assets:generate

Summary of Suggested Cron Jobs

Cron JobPurpose
mautic:segments:updateUpdate contact segments.
mautic:campaigns:rebuildRebuild campaigns based on segment changes.
mautic:campaigns:triggerTrigger campaign events (emails, actions, etc.).
mautic:emails:sendSend queued emails.
mautic:email:fetchProcess bounced emails and replies.
mautic:importProcess contact imports.
mautic:leadlists:updateUpdate lead lists.
mautic:iplookup:downloadDownload the MaxMind GeoLite2 IP lookup database.
mautic:reports:schedulerSend scheduled reports.
mautic:broadcasts:sendSend scheduled broadcasts.
mautic:messages:sendSend web notifications and in-app messages.
mautic:maintenance:cleanupClean up old data in the database.
mautic:assets:generateGenerate assets for landing pages and emails.

These cron jobs, when scheduled appropriately, ensure that Mautic runs smoothly, campaigns are executed on time, and performance remains optimal.