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 are without the WordPress table prefix; in production, each name is prefixed with
$wpdb->prefix.

actionscheduler_actions

Purpose: Stores scheduled actions and their execution metadata.

CREATE TABLE

CREATE TABLE {$wpdb->prefix}actionscheduler_actions (
  action_id bigint(20) unsigned NOT NULL auto_increment,
  hook varchar(191) NOT NULL,
  status varchar(20) NOT NULL,
  scheduled_date_gmt datetime NULL default '0000-00-00 00:00:00',
  scheduled_date_local datetime NULL default '0000-00-00 00:00:00',
  priority tinyint unsigned NOT NULL default '10',
  args varchar(191),
  schedule longtext,
  group_id bigint(20) unsigned NOT NULL default '0',
  attempts int(11) NOT NULL default '0',
  last_attempt_gmt datetime NULL default '0000-00-00 00:00:00',
  last_attempt_local datetime NULL default '0000-00-00 00:00:00',
  claim_id bigint(20) unsigned NOT NULL default '0',
  extended_args varchar(8000) DEFAULT NULL,
  PRIMARY KEY  (action_id),
  KEY hook_status_scheduled_date_gmt (hook(163), status, scheduled_date_gmt),
  KEY status_scheduled_date_gmt (status, scheduled_date_gmt),
  KEY scheduled_date_gmt (scheduled_date_gmt),
  KEY args (args(191)),
  KEY group_id (group_id),
  KEY last_attempt_gmt (last_attempt_gmt),
  KEY `claim_id_status_priority_scheduled_date_gmt` (`claim_id`,`status`,`priority`,`scheduled_date_gmt`),
  KEY `status_last_attempt_gmt` (`status`,`last_attempt_gmt`),
  KEY `status_claim_id` (`status`,`claim_id`)
) {$charset_collate};

Columns

  • action_id (bigint unsigned, PK, auto-increment): Unique identifier for each scheduled action.
  • hook (varchar(191), not null): Hook name that will be executed.
  • status (varchar(20), not null): Action status (e.g., pending, in-progress, complete, failed).
  • scheduled_date_gmt (datetime, nullable, default 0000-00-00 00:00:00): Scheduled execution time in GMT.
  • scheduled_date_local (datetime, nullable, default 0000-00-00 00:00:00): Scheduled execution time in local time.
  • priority (tinyint unsigned, not null, default 10): Execution priority; lower values run first.
  • args (varchar(191), nullable): Serialized or JSON-encoded action arguments for indexing.
  • schedule (longtext, nullable): Schedule object/metadata describing recurrence.
  • group_id (bigint unsigned, not null, default 0): Foreign key to the actionscheduler_groups table.
  • attempts (int, not null, default 0): Number of attempts to run the action.
  • last_attempt_gmt (datetime, nullable, default 0000-00-00 00:00:00): Last attempt time in GMT.
  • last_attempt_local (datetime, nullable, default 0000-00-00 00:00:00): Last attempt time in local time.
  • claim_id (bigint unsigned, not null, default 0): Claim identifier for batches of actions.
  • extended_args (varchar(8000), nullable): Extended argument storage for long payloads.

actionscheduler_claims

Purpose: Tracks claim batches for processing actions.

CREATE TABLE

CREATE TABLE {$wpdb->prefix}actionscheduler_claims (
  claim_id bigint(20) unsigned NOT NULL auto_increment,
  date_created_gmt datetime NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (claim_id),
  KEY date_created_gmt (date_created_gmt)
) {$charset_collate};

Columns

  • claim_id (bigint unsigned, PK, auto-increment): Unique identifier for the claim batch.
  • date_created_gmt (datetime, nullable, default 0000-00-00 00:00:00): Claim creation time in GMT.

actionscheduler_groups

Purpose: Stores action group slugs for grouping related actions.

CREATE TABLE

CREATE TABLE {$wpdb->prefix}actionscheduler_groups (
  group_id bigint(20) unsigned NOT NULL auto_increment,
  slug varchar(255) NOT NULL,
  PRIMARY KEY  (group_id),
  KEY slug (slug(191))
) {$charset_collate};

Columns

  • group_id (bigint unsigned, PK, auto-increment): Unique identifier for the group.
  • slug (varchar(255), not null): Group slug used for lookup.

actionscheduler_logs

Purpose: Stores log entries generated during action processing.

CREATE TABLE

CREATE TABLE {$wpdb->prefix}actionscheduler_logs (
  log_id bigint(20) unsigned NOT NULL auto_increment,
  action_id bigint(20) unsigned NOT NULL,
  message text NOT NULL,
  log_date_gmt datetime NULL default '0000-00-00 00:00:00',
  log_date_local datetime NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (log_id),
  KEY action_id (action_id),
  KEY log_date_gmt (log_date_gmt)
) {$charset_collate};

Columns

  • log_id (bigint unsigned, PK, auto-increment): Unique identifier for the log entry.
  • action_id (bigint unsigned, not null): Associated action ID.
  • message (text, not null): Log message text.
  • log_date_gmt (datetime, nullable, default 0000-00-00 00:00:00): Log time in GMT.
  • log_date_local (datetime, nullable, default 0000-00-00 00:00:00): Log time in local time.