Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/configuration/command_line_interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ These are the commands you may need to use in relation to your Mautic instance.
* - ``mautic:campaigns:rebuild``
- Rebuild Campaigns based on Contact Segments.
- ``mautic:campaigns:update``
* - ``mautic:campaigns:resume-stuck``
- Resume execution for Contacts stuck in Campaign workflows.
-
* - ``mautic:campaigns:trigger``
- Trigger timed events for active Campaigns.
-
Expand Down
48 changes: 48 additions & 0 deletions docs/configuration/cron_jobs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,54 @@

that these messages are only added to the queue when frequency rules apply either system wide or per Contact.

Resume stuck Campaign Contacts cron job

Check failure on line 90 in docs/configuration/cron_jobs.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Cron' instead of 'cron'. Raw Output: {"message": "[Vale.Terms] Use 'Cron' instead of 'cron'.", "location": {"path": "docs/configuration/cron_jobs.rst", "range": {"start": {"line": 90, "column": 32}}}, "severity": "ERROR"}

Check warning on line 90 in docs/configuration/cron_jobs.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Headings] 'Resume stuck Campaign Contacts cron job' should use sentence-style capitalization. Raw Output: {"message": "[Google.Headings] 'Resume stuck Campaign Contacts cron job' should use sentence-style capitalization.", "location": {"path": "docs/configuration/cron_jobs.rst", "range": {"start": {"line": 90, "column": 1}}}, "severity": "WARNING"}
=======================================

Sometimes Contacts can get stuck in Campaign workflows due to exceptions, server issues, or Events being added after the Contact has already progressed past that point in the Campaign. The ``mautic:campaigns:resume-stuck`` command identifies and processes these stuck Contacts.

Check warning on line 93 in docs/configuration/cron_jobs.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('being added'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('being added').", "location": {"path": "docs/configuration/cron_jobs.rst", "range": {"start": {"line": 93, "column": 100}}}, "severity": "INFO"}

.. code-block:: php

php /path/to/mautic/bin/console mautic:campaigns:resume-stuck <campaign-id>

This command:

- Finds Contacts that are stuck at specific points in a Campaign due to previous exceptions or errors

Check warning on line 101 in docs/configuration/cron_jobs.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Points' instead of 'points'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Points' instead of 'points'.", "location": {"path": "docs/configuration/cron_jobs.rst", "range": {"start": {"line": 101, "column": 45}}}, "severity": "INFO"}

Check warning on line 101 in docs/configuration/cron_jobs.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('are stuck'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('are stuck').", "location": {"path": "docs/configuration/cron_jobs.rst", "range": {"start": {"line": 101, "column": 23}}}, "severity": "INFO"}
- Identifies Contacts where new Events were added after they had already executed parent Events

Check warning on line 102 in docs/configuration/cron_jobs.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('were added'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('were added').", "location": {"path": "docs/configuration/cron_jobs.rst", "range": {"start": {"line": 102, "column": 40}}}, "severity": "INFO"}
- Resumes execution for these Contacts so they can continue through the Campaign workflow
- Ignores Contacts that were manually removed from the Campaign
- Skips scheduled Events that haven't been executed yet

Check warning on line 105 in docs/configuration/cron_jobs.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('been executed'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('been executed').", "location": {"path": "docs/configuration/cron_jobs.rst", "range": {"start": {"line": 105, "column": 39}}}, "severity": "INFO"}
- Doesn't process decision Events as they require Contact interaction

Command parameters:
~~~~~~~~~~~~~~~~~~~

- ``<campaign-id>`` (required): The ID of the Campaign to process.

- ``--dry-run``: Find stuck Contacts and their next Events without actually executing them. Useful for previewing what the command would do.

- ``--batch-limit=X`` or ``-l X``: Set the batch size of Contacts to process per round. Defaults to 1000.

- ``--min-contact-id=X``: Process only Contacts with ID greater than or equal to this value.

- ``--max-contact-id=X``: Process only Contacts with ID less than or equal to this value.

Example usage:

.. code-block:: php

# Preview stuck contacts without executing events
php /path/to/mautic/bin/console mautic:campaigns:resume-stuck 5 --dry-run

# Process stuck contacts in campaign 5 with smaller batches
php /path/to/mautic/bin/console mautic:campaigns:resume-stuck 5 --batch-limit=100

# Process a specific range of contacts
php /path/to/mautic/bin/console mautic:campaigns:resume-stuck 5 --min-contact-id=1000 --max-contact-id=2000

.. note::

This command only works with published Campaigns that aren't deleted. It processes a maximum of 5000 records in a single execution to prevent performance issues.

Check warning on line 136 in docs/configuration/cron_jobs.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Active or Available' instead of 'published'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Active or Available' instead of 'published'.", "location": {"path": "docs/configuration/cron_jobs.rst", "range": {"start": {"line": 136, "column": 34}}}, "severity": "INFO"}

.. vale off

Custom Field cron jobs
Expand Down
Loading