Navigation
Command Runner
Installation Usage API FAQAll Plugins
Multiple Transport Twig Templates Customizer Auto Tagger Unlimited SQL Command Runner Command Monitor Server MonitorCommand Runner
Easily run important Mautic tasks with just a click! No need to wait for cron jobs or ask your tech team.
With Command Runner, you get new buttons on your Mautic pages. Just click to:
- Rebuild Segments — Update your segments right away. No need to wait.
- Rebuild Campaigns — Refresh your campaigns with one click.
- Trigger Campaigns — Start campaign actions directly from the campaign page.
How Does It Work?
- Open a Segment or Campaign page in Mautic
- Click the new button for the action you want
- The plugin does the work in the background and lets you know when it's done
Installation
Step 1: Download
Get it from the official website.
Step 2: Copy the plugin
Place the plugin folder in plugins/CommandRunnerBundle
Step 3: Clear cache
php bin/console cache:clear
Step 4: Reload plugins list
php bin/console mautic:plugins:reload
Step 5: Re-generate assets
php bin/console mautic:assets:generate
After installation, go to Settings > Plugins in Mautic and make sure the plugin is enabled.
Usage
Look for the new buttons on segment and campaign pages:
- Rebuild Segment (on segment pages)
- Rebuild Campaign (on campaign pages)
- Trigger Campaign (on campaign pages)
Click the button for what you want to do. The plugin will do the work in the background and let you know when it's done.
Tip: This plugin is best for testing or small/medium Mautic setups. If you have very large segments or campaigns, it might be slower or sometimes not finish.
API
The Command Runner plugin extends the Mautic API, allowing you to rebuild segments, rebuild campaigns, and trigger campaigns programmatically.
Note: Ensure you have enabled API access in your Mautic settings and have the necessary permissions for segments and campaigns.
POST /api/commands/segments/{id}/rebuild
Rebuilds a specific segment by its ID.
POST https://your-mautic.com/api/commands/segments/5/rebuild
{ "success": true, "exitCode": 0, "output": "..." }
POST /api/commands/campaigns/{id}/rebuild
Rebuilds a specific campaign by its ID.
POST https://your-mautic.com/api/commands/campaigns/3/rebuild
{ "success": true, "exitCode": 0, "output": "..." }
POST /api/commands/campaigns/{id}/trigger
Triggers a specific campaign by its ID.
POST https://your-mautic.com/api/commands/campaigns/3/trigger
{ "success": true, "exitCode": 0, "output": "..." }
Response Fields
success—trueif the command finished without errors,falseotherwise.exitCode— The command exit code.0means success.output— The text output from the command.
Error Responses
Segment/campaign not found:
{ "errors": [{ "message": "Entity not found.", "code": 404 }] }
No access:
{ "errors": [{ "message": "You do not have access to this entity.", "code": 403 }] }
These API endpoints run commands synchronously and return the output. For large segments or campaigns, the request may take some time to complete.
FAQ
What if I have a lot of contacts or big campaigns?
This plugin works best for testing or smaller Mautic setups. If you have a lot of contacts or very big campaigns, it might be slower or sometimes not finish. We are working to make it better for big setups in the future.
Can you add more features?
Yes! If you need something special, contact us and tell us what you need.