WordPress Automation: Scheduling Tasks in WooCommerce With Action Scheduler

by on June 17, 2025
person typing on a laptop with a WooCommerce shopping cart icon overlaying the image

WooCommerce juggles countless behind-the-scenes tasks to keep your store running smoothly. It automatically handles order processing, follow-up emails, inventory updates, and more. Many of these are time-sensitive, and if they don’t fire when you expect them to, the result is lost sales and frustrated customers.

Most WooCommerce automation is handled by Action Scheduler, a task scheduler used by WooCommerce and many of its extensions. But store owners can also use it to schedule, manage, and monitor custom tasks.

In this article, we’ll walk through what Action Scheduler is, how it works, when to use it, and how to implement it. We’ll look at no-code methods for creating scheduled tasks and briefly see how developers can add tasks in code.

What is Action Scheduler

Action Scheduler is a task queue system built for WordPress by the team behind WooCommerce. It’s designed to run background jobs on a defined schedule without blocking the frontend or relying on user interaction.

The benefits of using Action Scheduler for automation are substantial, especially for stores with high traffic or complex workflows:

  • Reliability: Tasks are retried on failure and logged with detailed status information.
  • Scalability: Action Scheduler can handle everything from a handful of daily actions to tens of thousands of tasks per hour.
  • Transparency: The built-in dashboard interface shows you exactly what’s queued, what has run, and where any failures occurred.

Action Scheduler isn’t just for developers. While it includes a powerful API, many plugins expose its capabilities in an intuitive interface, so store owners can benefit from its power without writing code.

How Action Scheduler Works

Action Scheduler runs background tasks using a system called a task queue. Tasks are placed in the queue to be run later. Each one is tied to a WordPress hook, so it can tell WordPress, “run this function at a specific time.”

Tasks can be set to run once at a future time (like sending a follow-up email), repeatedly at set intervals (like generating a daily report), or as asynchronous tasks that run as soon as possible in the background without impacting user interactions (like syncing product data after a save).

To avoid overloading your site, Action Scheduler breaks large workloads into small batches. If there are more tasks than can be safely handled at once, it uses something called a loopback request to trigger a new round of processing. This system keeps everything moving while intelligently managing resources so the site’s frontend remains responsive.

Action Scheduler stores all task data in dedicated database tables so it can track what’s been run, what’s still pending, and what failed. Task traceability makes troubleshooting easier and helps ensure important tasks don’t get lost.

Action Scheduler vs. WP-Cron

WordPress includes its own built-in scheduler called WP-Cron, but it has limitations that make it unsuitable in some cases. As we explained in WooCommerce Cron Jobs: What They Do and Why They Matter, WP-Cron only runs when someone visits your site, so tasks can be delayed or skipped entirely on low-traffic sites. It isn’t built to handle large queues or critical operations.

Action Scheduler fixes those problems. It keeps a persistent queue, processes tasks in controlled batches, and includes retry logic for failed jobs. It can still use WP-Cron to trigger itself, but once triggered, it runs independently using its own optimized system.

Action Scheduler Use Cases and Practical Applications

Although Action Scheduler is best known for powering WooCommerce automation, it’s a general-purpose task scheduler available as a WordPress plugin and as a library.

Here are a few practical ways you might use it to save time and improve reliability:

  • Send a follow-up coupon email three days after a customer’s first purchase.
  • Automatically cancel unpaid orders after 24 hours.
  • Schedule a weekly sync with your inventory management system so stock levels match across your online store and POS tool.
  • Send subscription renewal reminders before a customer’s next billing date. 
  • Email a performance report to your marketing team with site traffic, top products, or campaign performance.
  • Delete expired discount codes or old product data on a set schedule.

These are just a few examples. If your site has tasks you’re repeating manually or forgetting entirely, there’s a good chance Action Scheduler can handle them for you.

How to Use Action Scheduler Without Coding

You don’t need to write a single line of code to benefit from Action Scheduler. Many popular plugins use it behind the scenes to manage background tasks. If you’re using WooCommerce, there’s a good chance Action Scheduler is already powering parts of your store.

Managing Scheduled Actions

You can view and manage scheduled tasks by going to WooCommerce > Status > Scheduled Actions in the WordPress dashboard. From here, you can filter actions by status, search by hook name, and manually run or delete specific tasks. The interface provides visibility into what’s happening in the background and is a helpful troubleshooting tool.

using Scheduled Actions in the WordPress dashboard

Creating Scheduled Tasks with AutomateWoo

AutomateWoo is a powerful marketing automation plugin that runs on top of Action Scheduler. You can create workflows that are triggered by customer behavior, like placing an order or abandoning a cart, and schedule follow-up actions like sending emails or applying coupons.

For example, you could build a workflow that sends a thank-you email 72 hours after a first purchase:

  • Trigger: Order Created (first-time customer only)
  • Delay: 3 days
  • Action: Send email with a discount code

The delayed action is managed entirely by Action Scheduler. It ensures the email goes out at the right time, even if your site is under heavy load.

Monitoring and Maintenance

It’s a good idea to check your scheduled actions regularly, especially if you’re running marketing automations or other time-sensitive tasks.

In the Scheduled Actions screen:

  • Check for failed actions. These are often caused by plugin misconfigurations, API timeouts, or missing data. Click into the log to see the error message and take action.
  • Look for stuck or past-due tasks. If a task remains “pending” long after its scheduled time, there may be a processing delay or conflict.
  • Manually retry or delete actions as needed. For critical tasks, you can rerun them manually by clicking “Run.”

Over time, failed actions accumulate in the database. Action Scheduler automatically removes completed and canceled actions after some time, but failed actions are retained indefinitely for debugging.

You don’t need to take action unless the queue becomes large. If it does, you may want to use a plugin like the premium Action Scheduler Cleaner or the free Cleanup Action Scheduler to remove old items and reduce overhead.

Adding Custom-Coded Tasks to Action Scheduler

For developers or site owners with custom automation needs, Action Scheduler offers a flexible and well-documented API. It allows you to schedule background tasks directly in your theme or custom plugin code. Let’s look at a few examples to show you might use Action Scheduler.

One-Time Scheduled Actions

You can use the as_schedule_single_action() function to schedule a task that runs once at a time in the future. It’s useful for anything that should happen later, like sending a follow-up email.

Here’s a basic example to show how new tasks can be added to the event queue. Let’s say you want to send a customer a feedback request email three days after their first WooCommerce order. You add code like the following to your theme’s functions.php file, or include it in a custom plugin if you prefer to keep things modular.

These code samples should not be used on a busy store before being scrutinized by a developer. It’s a generic example, not production-ready code.

Step 1: Schedule the task when the order is completed

add_action( 'woocommerce_order_status_completed', 'schedule_feedback_email', 10, 1 );

function schedule_feedback_email( $order_id ) {
    // Make sure the Action Scheduler function exists
    if ( ! function_exists( 'as_schedule_single_action' ) ) {
        return;
    }

    $run_time = time() + ( 3 * DAY_IN_SECONDS ); // 3 days from now
    $hook     = 'send_feedback_email';
    $args     = array( $order_id );
    $group    = 'post-purchase-tasks';

    // Prevent duplicate scheduling
    if ( ! as_has_scheduled_action( $hook, $args, $group ) ) {
        as_schedule_single_action( $run_time, $hook, $args, $group );
    }
}

Step 2: Define what the task actually does.

add_action( 'send_feedback_email', 'run_feedback_email_task' );

function run_feedback_email_task( $order_id ) {
    $order = wc_get_order( $order_id );
    if ( $order ) {
        $email = $order->get_billing_email();
        // Replace with custom email logic
        wp_mail( $email, 'How was your experience?', 'Let us know how we did!' );
    }
}

You’ll be able to view and manage this task in the WordPress dashboard under WooCommerce > Status > Scheduled Actions. From there, you can manually run, cancel, or retry it.

Recurring Background Jobs

You can use as_schedule_recurring_action() to run a task at regular intervals: daily, weekly, or however often you need. It’s frequently used for syncing data with external systems or generating periodic reports.

Asynchronous Background Processing

Use as_enqueue_async_action() when you need to offload a task immediately without delaying the user’s request. The main use is to offload time-consuming operations triggered by user actions like updating records or notifying external services.

Grow Faster with Pressable: Purpose-Built Managed Hosting for WooCommerce

If you’re ready to push automation further, you need hosting that won’t hold you back. Pressable’s managed WooCommerce hosting platform gives you:

Pressable gives you the speed, stability, and expert help you need to grow your WooCommerce store. Schedule a demo to see how Pressable supports ecommerce stores like yours.

Read More Articles in WordPress Ecommerce

Redhead man wearing plain white long sleeve polo looking at his watch with Pressable logo
WordPress Ecommerce

Top 6 Tips to Speed Up WooCommerce Sites

Red lights. Checkout lines. The spinning wheel of death. No one likes to wait, which is why successful ecommerce businesses understand how to speed up WooCommerce. How quickly your site loads directly impacts your conversion […]