60Web60

Managing scheduled tasks with WP-CLI

WP-CLI2 min read·

WordPress uses a system called WP-Cron to run scheduled background tasks: sending emails, checking for updates, clearing old data, and anything else that needs to happen on a schedule. By default, these tasks run when someone visits your site. WP-CLI lets you list pending tasks, see when they are due, and run them immediately without waiting for a visitor.

A note about Web60 server cron

Web60 runs WP-Cron on a server-level schedule so tasks fire reliably even on low-traffic sites. This is better than relying on visitor-triggered cron. You do not need to configure this. It is already set up for you.

Command reference

CommandWhat it does
wp cron event listLists all scheduled WP-Cron events with their hook name, next run time, and recurrence
wp cron event run <hook>Runs a specific cron event immediately by its hook name
wp cron event run --due-nowRuns all events that are currently due
wp cron event delete <hook>Removes a scheduled event permanently
wp cron schedule listLists all registered cron schedules (hourly, daily, etc.) and their intervals
wp cron testTests whether WP-Cron is working correctly on your site

Running a specific event immediately

Sometimes you want to trigger a scheduled task right now instead of waiting for it to run on its own. For example, you might want to manually trigger a backup plugin's scheduled task during testing.

  1. List all scheduled events to find the hook name:
wp cron event list
  1. Find the event you want to run and note its hook name from the first column.

  2. Run the event immediately:

wp cron event run <hook>

The event will execute straight away and you will see a confirmation message.

Need help?

If you have questions about scheduled tasks, visit our support page or email hello@smarthost.ie.

Frequently asked questions

How do I know if WP-Cron is working on my site?

Run wp cron test in the terminal. It will tell you whether cron is functioning correctly.

Can I delete a cron event permanently?

Yes, with wp cron event delete <hook>. Be careful: if the event was added by a plugin, the plugin may re-add it. Deleting events is usually only useful for debugging.

What is the difference between an event and a schedule?

A schedule is a recurring interval (like 'every hour' or 'daily'). An event is a specific task that is registered to run on one of those schedules.

Last updated: 25 March 2026