WooCommerce / Performance
WooCommerce Action Scheduler Problems
Short answer
Action Scheduler is the background job queue used by WooCommerce and many extensions for webhooks, emails, renewals and syncs. Problems show up as past-due or failed actions under Tools → Scheduled Actions. Past-due actions mean the queue is not being processed — usually WP-Cron not running reliably. Failed actions mean the job itself errors — the action's log explains why. Fix the runner or the failing code; never truncate the tables.
Symptoms
- Tools → Scheduled Actions (also under WooCommerce → Status) shows many Pending actions with dates in the past, or many Failed actions.
- An admin notice warns that past-due actions were found.
- Webhooks, order emails, subscription renewals or ERP syncs happen late or not at all.
- The
actionscheduler_actionsandactionscheduler_logstables grow to millions of rows. - The site slows down when the queue suddenly catches up.
How Action Scheduler runs
Actions are stored in the database and processed in batches by a queue runner. The runner is triggered by WP-Cron (every minute) and, on admin requests, by an asynchronous request; it can also be run with WP-CLI. Each batch processes a limited number of actions within a time limit, so a large backlog takes many runs to clear.
Most common causes
- WP-Cron is not running reliably: low traffic,
DISABLE_WP_CRONset without a real cron job replacing it, or loopback requests blocked by the host or a security plugin. - Actions fail: a PHP error in the job, an external API that rejects or times out, or data the job does not expect.
- A flood of actions: a plugin scheduling one action per product, order or customer, or rescheduling the same action repeatedly.
- Batches too slow: each action takes seconds (external calls), so a batch processes only a few before its time limit.
- Stale claims: a runner died mid-batch and its actions stay claimed until they are released.
Diagnosis
1. Read the queue
In Tools → Scheduled Actions, check the counts per status, then filter by Pending and sort by date: how old is the oldest past-due action? Filter by Failed and open a few: the log column shows the exception or error message.
2. Find which hooks dominate
On a copy of the database, a read-only query shows which jobs fill the queue:
SELECT hook, status, COUNT(*) AS total
FROM wp_actionscheduler_actions
GROUP BY hook, status
ORDER BY total DESC
LIMIT 20;(Replace wp_ with your table prefix.) One or two hooks usually account for most rows, and their names point to the plugin responsible.
3. Check that the runner runs
- Is
DISABLE_WP_CRONset inwp-config.php? If so, is a real cron job calling WP-Cron or WP-CLI every minute? - Does Tools → Site Health report problems with scheduled events or loopback requests?
- Does running the queue manually process actions?
$ wp action-scheduler run --batch-size=50Logs and technical checks
- Scheduled Actions screen: counts, oldest past-due, failed actions and their logs.
- WooCommerce → Status → Logs (
fatal-errors) and the PHP error log at the times actions fail. wp-config.phpforDISABLE_WP_CRON; the server's crontab.- Site Health for loopback and scheduled event problems.
- Table sizes of
actionscheduler_actionsandactionscheduler_logs.
Solutions
- Run WP-Cron from the server on busy or low-traffic sites: set
DISABLE_WP_CRONand add a cron job that runs every minute.
# crontab: run due WordPress cron events every minute
* * * * * cd /path/to/wordpress && wp cron event run --due-now --quiet- Fix the failing jobs: the action logs name the error; fix the code or the integration it calls, then let the failed work be retried or rescheduled as the plugin intends.
- Clear a backlog deliberately: run the queue with WP-CLI during quiet hours, watching server load.
- Stop the flood at the source: fix or reconfigure the plugin scheduling excessive actions.
- Let cleanup work: completed actions are removed after the retention period once the runner works normally.
- Tune with care: batch size, time limit and concurrent batches can be raised through filters, but only after the runner is reliable and the server has capacity.
What not to do
- Do not
TRUNCATEor bulk-delete the Action Scheduler tables. Pending rows include subscription renewals, webhooks, emails and syncs that have not happened yet. - Do not mark failed actions as complete without understanding what they were supposed to do.
- Do not raise concurrency on a server that is already struggling; it adds load without fixing the cause.
When to contact an expert
Bring in an engineer when failed actions affect payments, renewals or order syncs, when the tables are huge and the site slows down, or when you are not sure which pending actions are safe to remove.
Related problems
- WooCommerce / Integrations WooCommerce Webhook Troubleshooting Delivery logs, response codes, signatures, and why WooCommerce disables a webhook after repeated failed deliveries.
- WooCommerce / Performance WooCommerce Slow Checkout: What to Check Separate PHP execution time, database queries and external API calls before changing caching or hosting.
- WooCommerce / Payments WooCommerce Payment Failed but Customer Was Charged When the gateway captures the payment but the order stays pending or failed, look at the callback and webhook handoff before touching the order.
Frequently asked questions
What does “past-due actions found” mean?
Actions whose scheduled time has passed but that have not run yet. A few for a short time is normal on low-traffic sites; a growing number means the queue is not being processed.
Is it safe to delete scheduled actions?
Completed and cancelled actions are only history and are cleaned up automatically after the retention period. Pending actions are work that has not happened yet — renewals, webhooks, emails — and should not be deleted without knowing what they are.
Why are my actionscheduler tables so big?
Usually because a plugin schedules huge numbers of actions, because failed actions accumulate, or because the cleanup of completed actions is not running. Find which hooks dominate the table before deciding what to do.
Can I run Action Scheduler from the command line?
Yes. With WP-CLI, wp action-scheduler run processes the queue. It is useful to clear a backlog and to see errors directly.