This looks pretty cool! The only thing missing are notifications. Would it be possible to configure notifications when something fails? Perhaps just a campaign action and an email token would do. Then users would be able to configure which notifications they want and through which channel and to whom just by stock Mautic functionality.
The way I see it, we can add a checkbox like “Send alerts on failure.” If enabled, the user can choose the notification channel, and the system will send an alert to the configured email address or channel whenever a failure occurs.
We are currently testing a different approach in production: using MCD(MauticControlDaemon), our standalone daemon, as the scheduler for Mautic background operations instead of maintaining a separate cron entry for every command.
MCD runs continuously and checks each instance database itself. It performs due-only queries and starts only the segments, campaigns, imports, and other operations that are actually ready to run. The external cron does not need to remember which Mautic command should be executed and when.
MCD is responsible for:
detecting due work from the current database state;
placing tasks into internal queues;
applying priorities and concurrency limits;
starting only tasks that are allowed to run;
persisting task lifecycle state;
retrying failed operations according to policy;
continuing to monitor running processes after a daemon restart.
This is different from the traditional model where cron periodically starts commands such as mautic:segments:update or mautic:campaigns:trigger, even when there is no actual work to perform. With MCD, the daemon manages the scheduling and queue directly and creates processes only for tasks that are currently due.
So, for the main MCD-managed operations, there is no need to maintain another cron-based scheduling layer. The execution decision is made by MCD from the instance database and runtime configuration.
This is not merely a wrapper around cron. MCD provides the scheduling, queues, priorities, capacity control, retries, task status, and recovery of process supervision after a restart.