Mautic Command Options and Arguments

Threw together a quick and dirty list of cron/ssh commands with a list of options and the explanation. I got this info by running --help with the most commonly used commands.

Update contacts in smart segments based on new contact data.
mautic:segments:update [options]
mautic:segments:rebuild

Options:
-b, --batch-limit[=BATCH-LIMIT]
Set batch size of contacts to process per round. Defaults to 300. [default: 300]
-m, --max-contacts[=MAX-CONTACTS]
Set max number of contacts to process per segment for this script execution. Defaults to all. [default: false]
-i, --list-id[=LIST-ID]
Specific ID to rebuild. Defaults to all. [default: false]
-f, --force
Force execution even if another process is assumed running.
–bypass-locking
Bypass locking.
-t, --timeout=TIMEOUT
If getmypid() is disabled on this system, lock files will be used. This option will assume the process is dead after the specified number of seconds and will execute anyway. This is disabled by default. [default: false]

-x, --lock_mode=LOCK_MODE
Allowed value are “pid” , “file_lock” or “flock”. By default, lock will try with pid, if not available will use file system [default: “pid”]
-h, --help
Display this help message
-q, --quiet
Do not output any message
-V, --version
Display this application version
–ansi
Force ANSI output
–no-ansi
Disable ANSI output
-n, --no-interaction
Do not ask any interactive question
-e, --env=ENV
The Environment name. [default: “prod”]
–no-debug
Switches off debug mode.
-tm, --timing[=TIMING]
Measure timing of build with output to CLI . [default: false]
-v|vv|vvv, --verbose
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Rebuild campaigns based on contact segments.Usage:
mautic:campaigns:rebuild [options]
mautic:campaigns:update

Options:
-l, --batch-limit[=BATCH-LIMIT]
Set batch size of contacts to process per round. Defaults to 300. [default: 300]
-m, --max-contacts[=MAX-CONTACTS]
Set max number of contacts to process per campaign for this script execution. Defaults to all. [default: 0]
-i, --campaign-id[=CAMPAIGN-ID]
Build membership for a specific campaign. Otherwise, all campaigns will be rebuilt.
–contact-id[=CONTACT-ID]
Build membership for a specific contact.
–contact-ids[=CONTACT-IDS]
CSV of contact IDs to evaluate.
–min-contact-id[=MIN-CONTACT-ID]
Build membership starting at a specific contact ID.
–max-contact-id[=MAX-CONTACT-ID]
Build membership up to a specific contact ID.
–thread-id[=THREAD-ID]
The number of this current process if running multiple in parallel.
–max-threads[=MAX-THREADS]
The maximum number of processes you intend to run in parallel.
-f, --force
Force execution even if another process is assumed running.
–bypass-locking
Bypass locking.
-t, --timeout=TIMEOUT
If getmypid() is disabled on this system, lock files will be used. This option will assume the process is dead after the specified number of seconds and will execute anyway. This is disabled by default. [default: false]
-x, --lock_mode=LOCK_MODE
Allowed value are “pid” , “file_lock” or “flock”. By default, lock will try with pid, if not available will use file system [default: “pid”]
-h, --help
Display this help message
-q, --quiet
Do not output any message
-V, --version
Display this application version
–ansi
Force ANSI output
–no-ansi
Disable ANSI output
-n, --no-interaction
Do not ask any interactive question
-e, --env=ENV
The Environment name. [default: “prod”]
–no-debug
Switches off debug mode.
-v|vv|vvv, --verbose
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Trigger timed events for published campaigns.
Usage:
mautic:campaigns:trigger [options]

Options:
-i, --campaign-id[=CAMPAIGN-ID]
Trigger events for a specific campaign. Otherwise, all campaigns will be triggered.
–campaign-limit[=CAMPAIGN-LIMIT]
Limit number of contacts on a per campaign basis
–contact-id[=CONTACT-ID]
Trigger events for a specific contact.
–contact-ids[=CONTACT-IDS]
CSV of contact IDs to evaluate.
–min-contact-id[=MIN-CONTACT-ID]
Trigger events starting at a specific contact ID.
–max-contact-id[=MAX-CONTACT-ID]
Trigger events starting up to a specific contact ID.
–thread-id[=THREAD-ID]
The number of this current process if running multiple in parallel.
–max-threads[=MAX-THREADS]
The maximum number of processes you intend to run in parallel.
–kickoff-only
Just kickoff the campaign
–scheduled-only
Just execute scheduled events
–inactive-only
Just execute scheduled events
-l, --batch-limit[=BATCH-LIMIT]
Set batch size of contacts to process per round. Defaults to 100. [default: 100]
-f, --force
Force execution even if another process is assumed running.
–bypass-locking
Bypass locking.
-t, --timeout=TIMEOUT
If getmypid() is disabled on this system, lock files will be used. This option will assume the process is dead after the specified number of seconds and will execute anyway. This is disabled by default. [default: false]
-x, --lock_mode=LOCK_MODE
Allowed value are “pid” , “file_lock” or “flock”. By default, lock will try with pid, if not available will use file system [default: “pid”]
-h, --help
Display this help message
-q, --quiet
Do not output any message
-V, --version
Display this application version
–ansi
Force ANSI output
–no-ansi
Disable ANSI output
-n, --no-interaction
Do not ask any interactive question
-e, --env=ENV
The Environment name. [default: “prod”]
–no-debug
Switches off debug mode.
-v|vv|vvv, --verbose
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:

The mautic:import command starts to import CSV files when some are created.
Usage:
mautic:import [options]

Options:
-i, --id[=ID]
Specific ID to import. Defaults to next in the queue. [default: false]
-l, --limit[=LIMIT]
Maximum number of records to import for this script execution. [default: 0]
-h, --help
Display this help message
-q, --quiet
Do not output any message
-V, --version
Display this application version
–ansi
Force ANSI output
–no-ansi
Disable ANSI output
-n, --no-interaction
Do not ask any interactive question
-e, --env=ENV
The Environment name. [default: “prod”]
–no-debug
Switches off debug mode.
-v|vv|vvv, --verbose
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

The mautic:emails:send command is used to process the application’s e-mail queue

mautic:emails:send [options]

Options:
–message-limit[=MESSAGE-LIMIT]
Limit number of messages sent at a time. Defaults to value set in config.
–time-limit[=TIME-LIMIT]
Limit the number of seconds per batch. Defaults to value set in config.
–do-not-clear
By default, failed messages older than the --recover-timeout setting will be attempted one more time then deleted if it fails again. If this is set, sending of failed messages will continue to be attempted.
–recover-timeout[=RECOVER-TIMEOUT]
Sets the amount of time in seconds before attempting to resend failed messages. Defaults to value set in config.
–clear-timeout[=CLEAR-TIMEOUT]
Sets the amount of time in seconds before deleting failed messages. Defaults to value set in config.
–lock-name[=LOCK-NAME]
Set name of lock to run multiple mautic:emails:send command at time
-f, --force
Force execution even if another process is assumed running.
–bypass-locking
Bypass locking.
-t, --timeout=TIMEOUT
If getmypid() is disabled on this system, lock files will be used. This option will assume the process is dead after the specified number of seconds and will execute anyway. This is disabled by default. [default: false]
-x, --lock_mode=LOCK_MODE
Allowed value are “pid” , “file_lock” or “flock”. By default, lock will try with pid, if not available will use file system [default: “pid”]
-h, --help
Display this help message
-q, --quiet
Do not output any message
-V, --version
Display this application version
–ansi
Force ANSI output
–no-ansi
Disable ANSI output
-n, --no-interaction
Do not ask any interactive question
-e, --env=ENV
The Environment name. [default: “prod”]
–no-debug
Switches off debug mode.
-v|vv|vvv, --verbose
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

The mautic:email:fetch command is used to fetch and process messages such as bounces and unsubscribe requests. Configure the Monitored Email settings in Mautic’s Configuration.

mautic:email:fetch [options]
mautic:emails:fetch

Options:
-m, --message-limit[=MESSAGE-LIMIT]
Limit number of messages to process at a time.
-h, --help
Display this help message
-q, --quiet
Do not output any message
-V, --version
Display this application version
–ansi
Force ANSI output
–no-ansi
Disable ANSI output
-n, --no-interaction
Do not ask any interactive question
-e, --env=ENV
The Environment name. [default: “prod”]
–no-debug
Switches off debug mode.
-v|vv|vvv, --verbose
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

1 Like

Perhaps you could make an update to the docs:

There is a link at the bottom of the page where you can suggest edits and make a pull request!

As a newbie, this is very useful. Thank you!

This however is not clear:

Could you clarify where the CSVs need to be?

Upload via import function. Then use crons to upload in the background as opposed to browser.