Action Scheduler in Ultimate Member

What is Action Scheduler?

Action Scheduler is a background processing framework built for WordPress. It allows tasks (actions) to be scheduled to run at specific times or on a recurring basis without interrupting the website's normal functioning. Developed by Automattic, it efficiently handles scheduled emails, notifications, and other automated processes, especially when dealing with high volumes of tasks.


Key Features

  • Scheduled Actions: Enables tasks to run at designated times or as soon as possible (asynchronous actions).
  • Batch Processing: Processes large volumes of tasks efficiently in batches.
  • Traceability: Logs all scheduled actions, providing visibility into their status (pending, in progress, completed, or failed).

How Ultimate Member Uses Action Scheduler

In Ultimate Member, Action Scheduler is used to manage the scheduling and execution of system emails and other background tasks. It optimizes server load by queuing tasks to run at the most suitable times rather than processing them immediately, helping to improve overall site performance.

Benefits of Action Scheduler in UM

  • Optimized Server Performance: Tasks like email sending are scheduled to run at optimal times, reducing immediate server load.
  • Reliability: Ensures tasks are executed successfully, even during high-traffic periods.
  • Error Logging: Any failed tasks are logged, making it easier to identify issues and retry actions.

Action Scheduler Is Always Enabled in Ultimate Member

As of  Ultimate Member version 2.10.3Action Scheduler is always enabled in Ultimate Member. It runs in the background to manage scheduled tasks. The previous option to enable or disable Action Scheduler has been removed. It’s now replaced with a specific setting:

Use  Email sending by Action Scheduler — this option controls whether system emails (like registration confirmations and password resets) are sent asynchronously using Action Scheduler. The Action Scheduler framework itself remains active in Ultimate Member at all times.

How the Email Sending by Action Scheduler Option Works

When this option is enabled, certain tasks — such as system emails (e.g., registration confirmations, password resets) — are queued and scheduled to run asynchronously at the most appropriate times. This ensures that emails are processed efficiently in the background, reducing immediate server load and preventing delays during high-traffic periods.

To configure this setting:

  1. Go to wp-admin > Ultimate Member > Settings
  2. Click the Advanced tab > Features subtab.
  3. Find Email sending by Action Scheduler
  4. Enable or disable this option based on preference.
  5. Click Save Changes.

How Action Scheduler Works in Ultimate Member

Action Scheduler in UM works by queuing tasks to run at scheduled times, preventing any delays or strain on the website's performance. Here's how it works:

  1. Scheduling and Execution: Tasks are queued and then processed in the background. For example, emails sent during user registration are scheduled to be sent at optimal times.
  2. Batch Processing: For large tasks, the Action Scheduler processes actions in batches of 25. Once one batch is completed, the next batch is processed until all tasks are finished. This prevents overloading the server.
  3. Asynchronous Loopback Requests: If there are still tasks to process after a batch is completed, additional asynchronous loopback requests are made to continue processing tasks in a new request.
  4. Housekeeping: Completed or cancelled tasks that are older than one month are automatically removed. Additionally, actions that take longer than 5 minutes are considered timed-out and are marked as failed, though they can be updated to "completed" if they eventually succeed.
  5. Error Handling: If any action fails, the failure is logged for troubleshooting. The administrator can view these logs and retry failed tasks.

Monitoring and Troubleshooting Scheduled Actions

You can monitor scheduled actions via the Scheduled Actions Administration Screen:

  • Go to wp-admin > Tools > Scheduled Actions (or WooCommerce > Status > Scheduled Actions if WooCommerce is installed)
  • Filter actions by status: Pending, In Progress, Completed, Failed
  • View logs and retry failed actions.
  • Sort actions by:
    • Hook Name
    • Scheduled Date
    • Claim ID
    • Group Name


Advanced Configuration and Debugging

Developers can manage Action Scheduler through WP-CLI or its API for advanced configuration, debugging, or integrations. For developer documentation, visit ActionScheduler.org.


Summary

Action Scheduler in Ultimate Member is a powerful system for managing background tasks like email sending and notifications. By queuing actions to run at optimal times, it improves server performance and ensures reliable task execution. With traceable logs, batch processing, and built-in error handling, it's an invaluable tool for administrators and developers alike.


Changelog Note:

  • Introduced in: Ultimate Member 2.9.0
  • Action Scheduler always enabled since: Ultimate Member 2.10.3 (2025-04-24)
    Option changed from “Enable Action Scheduler” to “Use Action Scheduler for email sending”