Skip to main content Skip to content

Action Scheduler pending actions piling up? How to fix the queue

Action Scheduler is WooCommerce’s queue for work that happens in the background: syncing with accounting and inventory, subscription renewals, webhooks, updating analytics, and much of what plugins do outside the customer’s page view. As long as the queue runs, you don’t notice it. When pending actions pile up, things happen late or not at all, and the store can get slower.

This guide shows how to read the queue, why it grows, and how to get it running again without deleting work that still needs to be done.

What Action Scheduler does

Each task in the queue is an action with a name (a hook), the data it needs, and a time it should run. Actions are stored in the database table wp_actionscheduler_actions, and what happens to them is logged in wp_actionscheduler_logs. An action has one of these statuses:

StatusMeans
PendingWaiting for its time or to be run
Past-duePending, but its time has passed. Many of them mean the queue isn’t being run
In-progressRunning right now. If it stays there for long, it has probably stalled
CompleteRan without errors
FailedRan with an error. The log shows which
CanceledRemoved before it ran

The queue is run by WP-Cron. By default, WP-Cron starts when someone visits the site, and that’s the weak spot: on a store with few visits, or where most pages come from a cache without reaching PHP, the queue runs rarely and unevenly.

How to read the queue

Go to WooCommerce → Status → Scheduled Actions. At the top you can filter by status, with the count next to each. Look at three things in particular:

  1. Past-due actions: If there are many, and the number keeps rising, the queue isn’t being run often enough.
  2. Failed actions: Sort by hook. The hook and group column shows which plugin the action belongs to, and the log shows the error message.
  3. Pending actions from one plugin: If there are thousands of pending actions with the same hook, that plugin is adding more work to the queue than it can get through.

Why the queue piles up

  • WP-Cron doesn’t run: Too few visits reach PHP, or WP-Cron is turned off in wp-config.php with DISABLE_WP_CRON without the server running it instead. Then everything stops.
  • Actions that fail every time: An integration with the wrong credentials, an API that has been shut down, or a bug in a plugin. Each action takes time and fails again.
  • Actions from plugins that are gone: When a plugin is deactivated, its pending actions stay behind. There’s no code to run them, so they fail.
  • Too much work at once: An import, a bulk product update, or a sync that adds one action per product or order can fill the queue faster than it empties.
  • Slow actions: Actions that wait for answers from other servers can hit PHP’s time limit and get stuck as “in-progress”.

How to get the queue running again

Run WP-Cron from the server. This matters most. Ask your hosting provider to run WP-Cron from the server on a fixed schedule, for example every minute, and turn off the visit-triggered runs. Then the queue runs evenly, however many people visit the store, and not on top of your customers’ page views. Why that matters for the whole store is covered in the section on background jobs in the troubleshooting guide.

Fix the cause of the failures. Read the error message on the failed actions, and fix what it points to: credentials for an integration, a plugin that needs updating, or a setting. Cleaning up doesn’t help if the same error adds new actions to the queue every hour.

Cancel what shouldn’t run. Actions from plugins you’ve removed can be canceled from the list, several at a time. Leave pending actions from plugins you still use alone: they’re work that hasn’t been done yet, such as a subscription renewal or an order that needs to go to accounting.

Work through a big backlog from the server. If you or your hosting provider have WP-CLI access, the queue can be run with wp action-scheduler run. That’s faster than waiting for WP-Cron when a lot has piled up, for example after an outage or an import.

Large tables and cleanup

Action Scheduler deletes old actions by itself. Completed and canceled actions are removed after 30 days by default. Failed actions used to be kept forever, and on busy stores they could fill the tables. Since Action Scheduler 4.0, which shipped with WooCommerce 11.0, failed actions are deleted after three months, and cleanup runs as a fixed daily job. That’s in WooCommerce’s overview of the changes in Action Scheduler 4.0.

If the store runs an older version of WooCommerce, or the tables grew very large before the cleanup arrived, it’s worth updating and letting the cleanup do its work. If you clean up yourself, take a backup first, and only delete completed, canceled and failed actions and their logs. Large tables mainly slow down the admin and the queue itself. The other causes of a slow admin are in our guide to a slow WooCommerce admin.

If you’re switching order storage to HPOS, the orders are copied through the queue too. Get it running reliably first. The process is in our guide to migrating to HPOS without downtime.

Frequently asked questions

Can I just empty the table?

No. Pending actions are work that hasn’t been done, and if you delete them, it never happens. Only delete completed, canceled and failed actions, and fix the cause of the failures first.

Is it a problem that there are many completed actions?

Rarely. They’re deleted automatically after 30 days. It’s the past-due and failed ones to watch.

Want help?

A queue that has stopped is often only noticed when orders are missing from the accounts or a subscription hasn’t renewed. If you’d like us to find out why your queue is piling up, read about optimizing your WooCommerce store. We take a free look at your store first and tell you what it will take.

← All articles

Want help with your store?

Is your store slow, unstable or just hard to work with? Write a few lines and a link, and you'll get an honest assessment from the developer.