JEM Notifications Taks

Plugin name: Task - JEM Notifications
Extension: plg_task_jem
Plugin group: Task
Task type: jem.notifications
Available in: JEM 5.1.0 Beta 4
Joomla compatibility: Joomla 5.4.x and Joomla 6.x

Overview

The Task - JEM Notifications plugin connects JEM's notification queue and reservation reminders to Joomla's native Scheduled Tasks system.

The scheduled task can:

  • Send reservation reminders that have reached their scheduled time.
  • Retry failed JEM notifications.
  • Recover notification attempts interrupted during processing.
  • Cancel reminders that are no longer eligible for delivery.
  • Apply the configured notification-history retention policy.
JEM 5.1 only: This plugin is not included in JEM 5.0.1 or JEM 5.0.2 Beta 1. It depends on the notification, reminder and registration infrastructure introduced in JEM 5.1.0 Beta 4.

Requirements

  • JEM 5.1.0 Beta 4 or a later compatible JEM version.
  • Joomla 5.4.x or Joomla 6.x.
  • The complete JEM package installed successfully.
  • The Task - JEM Notifications plugin enabled.
  • The JEM Mailer plugin enabled and correctly configured.
  • A working Joomla global mail configuration.
  • JEM notification automation available in the selected operating profile.
  • Joomla Scheduled Tasks execution configured on the server.
Notification automation is not available in the JEM Essential operating profile. Selecting a profile that does not permit notification automation prevents the task from processing reminders.

Installation Behaviour

The complete JEM 5.1.0 package performs the initial task setup automatically:

  1. Installs the plg_task_jem plugin.
  2. Enables the plugin.
  3. Creates one Joomla Scheduled Task with the type jem.notifications.
  4. Names the task JEM - Process scheduled notifications.
  5. Assigns a default execution interval of ten minutes.
  6. Enables or disables the task according to the global JEM reminder setting.

Task creation is idempotent. Updating JEM does not intentionally create a second active JEM notification task when the managed task already exists.

The task is installed but remains disabled while Enable event reminders is set to No.

Plugin Configuration

The plugin does not provide independent notification settings in the Joomla plugin manager. Its task form displays a notice explaining that the notification workflow is managed by JEM.

Configuration is divided between two places:

Configuration areaControls
JEM Settings → Notifications Enables reminders, defines the all-day reference time, retention, resend limits, cooldown and maximum delivery attempts.
Joomla Scheduled Tasks Controls the execution interval, manual execution and Joomla task execution history.

Enable Scheduled Reminders

  1. Open Components → JEM → Settings → Notifications.
  2. Set Enable event reminders to Yes.
  3. Select the reference time used for all-day events. The default is 09:00.
  4. Review the notification retention and maximum-attempt settings.
  5. Save the JEM settings.

When the settings are saved, JEM:

  • Ensures that the Task plugin is enabled.
  • Creates the managed task if it does not already exist.
  • Enables or disables the existing task.
  • Synchronises future reminder notifications when reminders are enabled.
  • Cancels pending reminders when reminder automation is disabled.
Because the plugin and task are managed by JEM, saving the JEM Notifications settings can re-enable the Task plugin or change the task's published state. Use the global JEM reminder option when reminder processing must be disabled.

Configure the Joomla Scheduler

Enabling the task does not by itself guarantee that the server executes Joomla Scheduled Tasks. The site must use a Joomla-supported scheduler runner, such as CLI execution, web cron or the scheduling mechanism configured by the hosting provider.

  1. Open System → Scheduled Tasks.
  2. Find JEM - Process scheduled notifications.
  3. Confirm that the task is enabled.
  4. Review its execution interval.
  5. Configure the Joomla task runner on the server.
  6. Use Joomla's manual execution option to perform an initial test.

The task is created with an interval of ten minutes. Administrators can change this interval in Joomla's Scheduled Tasks screen. Saving the JEM notification settings synchronises the task state but preserves the existing Joomla execution interval.

Task Processing Workflow

Each execution performs the following operations:

  1. Loads the JEM notification and reminder services.
  2. Recovers notification attempts left in processing state for too long.
  3. Moves due scheduled notifications into the delivery queue.
  4. Loads up to 100 due notifications for the current execution.
  5. Revalidates reminder eligibility before delivery.
  6. Cancels reminders that are no longer valid.
  7. Passes eligible notifications to the JEM Mailer plugin.
  8. Records the result of every delivery attempt.
  9. Schedules another attempt when a retry is permitted.
  10. Applies notification-history retention when its daily check is due.

If more than 100 notifications are waiting, the remaining notifications are processed during subsequent task executions.

Reminder Eligibility

Before sending a reminder, JEM confirms that the stored notification is still eligible. Reminders are intended for:

  • Confirmed registrations.
  • Registrations that are not on the waiting list.
  • Active and verified Joomla user accounts.
  • Events with a valid event date.
  • Events that have not been cancelled.
  • Events with reminders enabled and at least one interval selected.

If a registration, event or reminder configuration changes before delivery, the pending reminder can be cancelled while its history remains available.

Open-date events do not generate reminder notifications. If the calculated reminder time has already passed when a registration becomes eligible, that reminder is not sent late.

Time and Timezone Handling

  • Timed events use their authoritative start instant.
  • All-day events use the configured local reference time, which defaults to 09:00.
  • Event and venue timezone information is used before converting the due time to UTC.
  • Scheduled notification timestamps are processed in UTC.

This prevents the server timezone from silently changing when a reminder should be sent.

Automatic Retry Policy

A failed notification can be retried automatically while it has not reached its maximum number of attempts.

The default retry delays are:

  1. 10 minutes after the first failed attempt.
  2. 30 minutes after the second failed attempt.
  3. 120 minutes after the third failed attempt.

The default maximum is four attempts, including the initial delivery attempt. The maximum can be changed in JEM Notification Settings.

An automatic retry sends the immutable stored notification snapshot. It does not regenerate the subject, message or recipient data from the current event.

Interrupted Task Recovery

If a scheduler execution is interrupted while a notification is being processed, JEM can recover the abandoned operation.

Processing attempts older than 30 minutes are marked as failed and returned to the controlled retry workflow. This prevents a notification from remaining permanently locked in processing state after an interrupted cron or PHP process.

Notification Retention

Notification retention is configured in days in JEM Settings → Notifications.

ValueBehaviour
0 Notification history is retained indefinitely.
Greater than 0 Terminal notification snapshots and attempts older than the selected number of days are removed.

Retention is checked by the scheduled task at most once per day. It can remove:

  • Sent notifications.
  • Cancelled notifications.
  • Permanently failed notifications that have no further retry or have reached their maximum attempts.

Scheduled, queued or otherwise pending notifications are not removed by the retention process.

Retention processing is part of the JEM scheduled task. If that task is disabled or the Joomla scheduler runner is not executing, automatic retention does not run.

Task Result and Logging

After each execution, the task writes a summary to Joomla's task log using the following counters:

  • Due: notifications selected for processing.
  • Sent: successful deliveries.
  • Failed: unsuccessful delivery attempts.
  • Cancelled: reminders that were no longer eligible.
  • Recovered: interrupted processing attempts recovered.
  • Purged: terminal records removed by retention.

Example task result:

JEM notifications: 8 due, 7 sent, 1 failed, 0 cancelled,
0 recovered, 12 purged.

Individual delivery attempts can be inspected in Components → JEM → Notifications → History.

Configuration Examples

Example 1: Standard event reminders

  • Enable event reminders globally.
  • Keep the task interval at ten minutes.
  • Use reminder definitions for seven days, 24 hours and two hours.
  • Select the required intervals on each event.
  • Keep the default maximum of four delivery attempts.

This configuration is suitable for a normal event site with a moderate number of registrations.

Example 2: High-volume registration site

  • Enable event reminders globally.
  • Run Joomla Scheduled Tasks every five minutes.
  • Monitor task duration and the number of pending notifications.
  • Verify that the hosting provider permits the required cron frequency.

Each execution processes a maximum of 100 due notifications. More frequent executions can reduce a large queue without changing that safe batch limit.

Example 3: Limited notification retention

  • Set notification retention to 90 days.
  • Keep the task enabled and the Joomla scheduler runner active.
  • Restrict access to Notification History to authorised administrators.

The task checks retention once per day and removes terminal records older than 90 days while preserving pending work.

Permissions

The scheduled task runs as a system process. Normal frontend users do not need access to Joomla Scheduled Tasks.

Administrator access to related JEM screens is controlled separately:

  • jem.notifications.templates controls notification template management.
  • jem.notifications.history controls access to notification history.
  • jem.notifications.resend controls administrator retry and resend operations.

These permissions do not start or stop the server scheduler. Joomla Scheduled Tasks permissions and the hosting cron configuration remain separate.

Technical Structure

File or directoryPurpose
jem.xml Defines the Joomla Task plugin, namespace, files and language resources.
services/provider.php Registers the namespaced plugin with Joomla's service container.
src/Extension/Jem.php Advertises the task type and executes the JEM notification batch.
forms/process_notifications.xml Displays the notice that notification behaviour is managed from JEM Settings.
site/classes/reminderschedulerservice.class.php Creates, enables, disables and reports the status of the native Joomla task.
site/classes/reminderservice.class.php Builds reminder snapshots, calculates UTC delivery times and processes due work.
site/classes/notificationservice.class.php Stores notification snapshots and attempts, applies retries, recovery and retention.

The plugin has no frontend layout, CSS stylesheet or template override.

Verification Checklist

  1. Confirm that JEM 5.1.0 Beta 4 is installed.
  2. Confirm that Task - JEM Notifications is enabled.
  3. Enable event reminders in JEM Notification Settings.
  4. Confirm that the JEM settings page reports the Joomla task as active.
  5. Open Joomla Scheduled Tasks.
  6. Confirm that only one active JEM - Process scheduled notifications task exists.
  7. Configure an event with a future date and a reminder interval.
  8. Create a confirmed registration using an active Joomla account.
  9. Run the scheduled task manually.
  10. Review the Joomla task result.
  11. Review the notification and attempt in JEM Notification History.
  12. Confirm that the test email was received.

Troubleshooting

The JEM task does not exist

  • Confirm that the complete JEM 5.1.0 package was installed.
  • Save the JEM Notification Settings again.
  • Check for a task synchronisation warning after saving.
  • Reinstall or update the complete package if the plugin is missing.

The task exists but is disabled

  • Enable event reminders in JEM Notification Settings.
  • Use a JEM operating profile that permits notification automation.
  • Save the JEM settings to synchronise the task state.

The task is enabled but never runs

  • Configure Joomla Scheduled Tasks execution on the server.
  • Review the Joomla scheduler execution method and secret where applicable.
  • Run the task manually to distinguish a cron problem from a JEM problem.
  • Check Joomla task logs and server cron logs.

The task runs but no reminder is created

  • Confirm that reminders are enabled globally.
  • Confirm that the event has reminders enabled.
  • Confirm that at least one published reminder interval is selected.
  • Confirm that the event has a date.
  • Confirm that the reminder time is still in the future.
  • Confirm that the registration is attending and not waiting.
  • Confirm that the booking holder has an active and verified Joomla account.

Notifications are processed but email delivery fails

  • Enable and configure the JEM Mailer plugin.
  • Test Joomla's global mail configuration.
  • Open JEM Notification History and inspect the latest attempt.
  • Check the recorded error and the next retry time.
  • Check the hosting provider's mail restrictions and server mail logs.

Old notification history is not removed

  • Confirm that retention is greater than zero days.
  • Confirm that the JEM task is enabled and running.
  • Remember that retention is checked at most once every 24 hours.
  • Confirm that the records are terminal and older than the retention period.
  • Pending notifications are deliberately preserved.

A large queue is not completed in one run

  • The task processes a maximum of 100 due notifications per execution.
  • Run the task again or reduce its Joomla execution interval.
  • Check that previous executions complete before the next one starts.
  • Monitor mail-provider delivery limits before increasing task frequency.

Related Documentation