• Resolved Kaleu_87

    (@kaleu_87)


    Hey, how is it possible to delete all completed jobs in the action-scheduler? We have around 50.000 and are looking for an easy way to delete all of them at once…Greetings!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @kaleu_87

    Deleting completed jobs in the Action Scheduler can be performed using a couple of methods. However, please note that this should be done with caution as it could potentially interrupt ongoing tasks.

    1. If you have access to WP-CLI on your server, you can use it to delete completed actions. This is the command you would use to delete all completed jobs:

    wp action-scheduler delete all --status=complete

    2. You can also delete completed actions through the Action Scheduler’s admin UI (WooCommerce → Status → Complete) by selecting all, but this will only delete 10 at a time.

    Before proceeding with either method, we strongly recommend taking a full backup of your website.

    I hope this helps!

    This does not work:

    wp action-scheduler delete all --status=complete

    I get this:

    Error: ‘delete’ is not a registered subcommand of ‘action-scheduler’. See ‘wp help action-scheduler’ for available subcommands.

    This works. It deletes all in batches of 20 entries at a time.

    wp action-scheduler clean --status=complete

    Hi @millionleaves

    Thank you so much for correcting it and for letting us know which worked. This will help other members having the same concern as yours.

    If you still need assistance, since this thread has been marked as “Resolved”, kindly start a new topic for us to further investigate.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘action-scheduler’ is closed to new replies.