Documentation

Installation

  1. Download the package and place it under packages/ of your Concrete CMS installation.
  2. In the Dashboard, go to Extend Concrete and install “Macareux Messenger Notifier”.
  3. The installer adds a settings page at /dashboard/system/automation/task_notifications.

Configuration

You can configure settings via Dashboard or configuration files.

  • Dashboard (recommended):

    • Go to Dashboard > System & Settings > Automation > Task Notifications.
    • Set “Notify on Completion To Email” and/or “Notify on Failure To Email”.
      • Leave blank to disable that type of email.
      • Use commas to add multiple recipients (e.g., ops@example.com, dev@example.com).
    • Select which tasks should trigger completion and/or failure notifications.
    • Click Save.
  • Configuration file (advanced/alternative):

    • Copy and adapt the example to application/config/md_messenger_notifier/settings.php (or let the Dashboard page write to application/config/generated_overrides/md_messenger_notifier/settings.php).

Example configuration:

return [
    'task' => [
        'completion' => [
            // Comma-separated list also supported via the Dashboard UI
            'notify_email' => 'username@example.com',
            // If empty or undefined, all tasks are allowed. Otherwise, only listed task handles will trigger completion notifications.
            'include' => [],
        ],
        'failure' => [
            'notify_email' => 'username@example.com',
            // If empty or undefined, all failures are allowed. Otherwise, only listed task handles will trigger failure notifications.
            'include' => [],
        ],
    ],
];

You can also see an example at:

  • packages/md_messenger_notifier/config/md_messenger_notifier/example-settings.php

Notes:

  • The “From” address is taken from Concrete CMS: concrete.email.default.address.
  • Leave notify_email empty to disable sending for that event type.
  • When include lists are set and non-empty, only those task handles will trigger notifications.

Email templates

  • Completion: mail/task_completion_notification.php
    • Parameters: siteName, taskName, dateStarted, dateCompleted, exitCode.
  • Failure: mail/task_failure_notification.php
    • Parameters: siteName, error, message.

How it works

  • Completion emails are sent on Concrete’s ProcessEvent for task processes.
  • Failure emails are sent on Symfony Messenger WorkerMessageFailedEvent.
  • A best-effort task handle detection is used for failures to apply include filters when possible.

Usage

Once installed and configured, notifications are automatic:

  • Run tasks via the Dashboard, CLI, or automation; completion emails are sent for selected tasks.
  • If a queued worker message fails, failure emails are sent (filtered by task handle include list when detectable).