Action Scheduler
Querying scheduled actions
This document covers the public query helpers for scheduled actions. Overview Action Scheduler provides three main query helpers: as_next_scheduled_action() —...
Scheduling actions
This document covers the public scheduling helpers exposed by Action Scheduler. Overview Use these functions to enqueue or schedule actions...
Unscheduling actions
This document covers the public unscheduling helpers in Action Scheduler. Overview Unscheduling cancels existing scheduled actions. For recurring and cron...
ActionScheduler_SystemInformation
Located in classes/ActionScheduler_SystemInformation.php. Provides information about the currently active Action Scheduler source and registered sources. Public Methods active_source() Return details...
ActionScheduler_AdminView
Located in classes/ActionScheduler_AdminView.php. Wires Action Scheduler’s admin UI into WordPress (Tools → Scheduled Actions) and WooCommerce system status when available....
ActionScheduler_QueueCleaner
Located in classes/ActionScheduler_QueueCleaner.php. Provides cleanup routines for old actions, timed-out claims, and long-running failures. Public Methods __construct( ?ActionScheduler_Store $store =...
ActionScheduler_Compatibility
Located in classes/ActionScheduler_Compatibility.php. Provides lightweight compatibility wrappers for WordPress core functions that were introduced in later WP versions. Public Methods...
ActionScheduler_DateTime
Located in classes/ActionScheduler_DateTime.php. Extension of PHP’s DateTime that supports explicit UTC offsets when a timezone string is not available. Public...
ActionScheduler_ActionFactory
Located in classes/ActionScheduler_ActionFactory.php. Creates and stores scheduled actions with different schedule types (async, single, recurring, cron) and can hydrate stored...
Migration Config
Action_SchedulerMigrationConfig is a builder class that configures the migration runner with source/destination stores and loggers. Since: 3.0.0 Source: classes/migration/Config.php Purpose...
Migration Overview
Action Scheduler's migration system moves scheduled actions from legacy WP Post-based storage to custom database tables for improved performance and...
Migration Runner
Action_SchedulerMigrationRunner executes the actual migration of actions and logs from the source store to the destination store. Since: 3.0.0 Source:...
Migration Scheduler
Action_SchedulerMigrationScheduler manages the background scheduling of migration batches. Since: 3.0.0 Source: classes/migration/Scheduler.php Purpose The Scheduler: Schedules recurring migration batches as...
ActionScheduler_CanceledSchedule
ActionScheduler_CanceledSchedule represents a canceled action. It explicitly has no next run, even if a scheduled date exists. Class definition class...
ActionScheduler_CronSchedule
ActionScheduler_CronSchedule represents a recurring schedule based on a cron expression and the CronExpression parser. Class definition class ActionScheduler_CronSchedule extends ActionScheduler_Abstract_RecurringSchedule...
ActionScheduler_IntervalSchedule
ActionScheduler_IntervalSchedule represents a recurring schedule that runs at fixed intervals measured in seconds. Class definition class ActionScheduler_IntervalSchedule extends ActionScheduler_Abstract_RecurringSchedule implements...
ActionScheduler_NullSchedule
ActionScheduler_NullSchedule represents an async action with no scheduled date. It intentionally has no run time and is used for actions...
Schedule Overview
Action Scheduler schedules describe when an action should run and whether it recurs. Schedules implement ActionScheduler_Schedule and are attached to...
ActionScheduler_SimpleSchedule
ActionScheduler_SimpleSchedule represents a one-time schedule that runs at a single date/time and never recurs. Class definition class ActionScheduler_SimpleSchedule extends ActionScheduler_Abstract_Schedule...
Action Scheduler database tables
This document summarizes the Action Scheduler custom tables created by the schema classes in classes/schema/. All table names shown below...
Action Scheduler indexes
This document describes indexes defined in the Action Scheduler schema and how they support common queries. Indexes are defined in...
Schema versioning and upgrades
This document describes how Action Scheduler manages schema versions and upgrades for its custom tables. The behavior is defined in...
Logger Stores
Action Scheduler logging is handled by the ActionScheduler_Logger abstraction and two concrete implementations: ActionScheduler_DBLogger (custom tables) ActionScheduler_wpCommentLogger (legacy WP comments)...
Data Store Overview
This document describes Action Scheduler’s store abstraction (ActionScheduler_Store) and how to select or extend stores. Purpose of the Store Abstraction...
ActionScheduler_DBStore (Custom Tables)
ActionScheduler_DBStore is the default store implementation that persists actions in custom database tables. It lives in classes/data-stores/ActionScheduler_DBStore.php and extends the...
ActionScheduler_HybridStore (Migration Bridge)
ActionScheduler_HybridStore is a wrapper store that reads from two stores and migrates actions from the legacy store to the custom-table...
ActionScheduler_wpPostStore (Legacy WP Posts Store)
ActionScheduler_wpPostStore persists actions as a custom post type (scheduled-action) plus post meta and taxonomy data. It lives in classes/data-stores/ActionScheduler_wpPostStore.php and...
Running Action Scheduler at Scale (WP-CLI)
This guide documents the scale-focused knobs exposed by Action Scheduler’s WP-CLI commands and queue runner. All behavior described here is...
WP-CLI: `action-scheduler action`
This reference documents the wp action-scheduler action subcommands implemented in classes/WP_CLI/Action_Command.php and classes/WP_CLI/Action/*. Subcommands list — Query scheduled actions (supports...
WP-CLI Commands (Action Scheduler)
This reference is generated from the Action Scheduler source code. All commands and arguments below are verified in the classes/WP_CLI/...
ActionScheduler_Action
Base class for all scheduled actions. It encapsulates the hook to execute, arguments, schedule, group, and priority. It is the...
ActionScheduler_CanceledAction
Represents a stored action that has been canceled. It behaves like a finished action but ensures it uses a null...
ActionScheduler_ActionClaim
Represents a claim on a set of action IDs. Claims are used by the queue runner and data stores to...
ActionScheduler_FinishedAction
Represents a stored action that is already finished. It is used for actions whose stored status is not pending or...
ActionScheduler_NullAction
Null object implementation of an action. It represents a missing or invalid action record and is returned by data stores...
Actions Overview
This document summarizes how Action Scheduler represents actions in code and how those actions move through states during their lifecycle....
Action Scheduler Architecture
This document explains the core initialization flow and internal architecture of Action Scheduler (AS) based on the following source files:...
Async HTTP Request Queue Runner
Overview ActionScheduler_AsyncRequest_QueueRunner extends WP_Async_Request to run the queue via a non-blocking HTTP request. This provides a fallback and a way...
Batch Processing
Overview The queue runner processes actions in batches, balancing throughput with limits on time and memory. Batch size Batch size...
WP-Cron Integration
Overview ActionScheduler_QueueRunner integrates with WP-Cron by registering a custom schedule and a cron hook that runs the queue. Schedule and...
Fatal Error Monitoring
Overview ActionScheduler_FatalErrorMonitor tracks the currently executing action and detects unexpected fatal shutdowns. If a fatal error occurs, it marks the...
Locking
Overview Locks prevent concurrent or overly frequent operations that could overload the database or trigger duplicate runners. ActionScheduler_Lock defines the...
Queue Runner Overview
Goal The queue runner coordinates how pending actions are claimed, executed, and marked complete, while respecting time and memory limits....