Action Scheduler Cleanup and Optimization

Updated on 12. 6. 2025

The WordPress Action Scheduler can quickly increase the size of your database by storing a large number of logs and completed actions. ZiziCache provides specialized tools for cleaning these tables.

What Action Scheduler Cleans

The plugin automatically cleans the following tables:

  • actionscheduler_logs – logs older than the set number of days
  • actionscheduler_actions – completed, canceled, and failed actions

Cleaning Configuration

Action Scheduler cleaning is configured using the following parameters:

'db_actionscheduler_clean' => true, // enable cleaning
'db_actionscheduler_logs_days' => 2, // logs older than 2 days
'db_actionscheduler_actions_days' => 7, // actions older than 7 days

Monitoring Action Scheduler Size

The plugin provides statistics on the size of Action Scheduler tables:

  • Size of the actions table in MB
  • Size of the logs table in MB
  • Number of records by status (complete, pending, canceled, failed)
  • Total number of logs

Automatic Scheduling

Action Scheduler cleaning is performed automatically after each regular database cleaning via the WordPress action zizi_cache_database_after_options.

Optimization After Cleaning

After data cleaning, table optimization is automatically initiated (if enabled), which frees up space from fragmented tables.

What are your feelings