---
title: "fswa_queue_processed — Action Hook"
description: "Fires after every queue batch, with the processed / succeeded / failed / rescheduled counts — also when the batch was empty."
url: "https://wpwebhooks.org/docs/fswa-queue-processed/"
---

[WP Webhooks](https://wpwebhooks.org/) / [Docs](https://wpwebhooks.org/docs/) / fswa\_queue\_processed

Action since v3.3.0

# fswa\_queue\_processed

Fires after every queue batch, with the processed / succeeded / failed / rescheduled counts — also when the batch was empty.

/ Signature

```
do_action( 'fswa_queue_processed', $result )
```

/ When it fires

At the end of every queue tick — WP-Cron, Action Scheduler, System Cron or External Cron — after the last job of the batch. The Notifications sender uses it to flush pending notifications on the same tick that produced them. Fires even when no jobs were due, so it is a reliable "the queue ran" heartbeat.

/ Parameters

| Name | In | Type | Req | Description |
| --- | --- | --- | --- | --- |
| $result | param | array | yes | \`processed\`, \`succeeded\`, \`failed\`, \`rescheduled\`, \`stale\_cleaned\`, \`orphans\_closed\` — integers for this tick. |

/ Examples

Record a heartbeat for an uptime monitor

```
add_action( 'fswa_queue_processed', function ( array $result ) {
    update_option( 'my_last_queue_tick', [ 'at' => time(), 'processed' => $result['processed'] ], false );
} );
```

/ Related

[Async Delivery Queue](https://wpwebhooks.org/docs/async-queue/)[fswa\_delivery\_event](https://wpwebhooks.org/docs/fswa-delivery-event/)[External Cron](https://wpwebhooks.org/docs/external-cron/)

/Ready

## Your next automation is  
one sentence away.

[Install Plugin→](https://downloads.wordpress.org/plugin/flowsystems-webhook-actions.zip) [Try the Live Preview](https://playground.wordpress.net/?blueprint-url=https://wpwebhooks.org/blueprint.json) [See the Plugin →](https://wpwebhooks.org/wordpress-webhook-plugin/)

$ wp plugin install flowsystems-webhook-actions --activate

## Structured data

```json
{"@context":"https://schema.org","@type":"TechArticle","name":"fswa_queue_processed — Action Hook — Webhook Actions Docs","description":"Fires after every queue batch, with the processed / succeeded / failed / rescheduled counts — also when the batch was empty.","url":"https://wpwebhooks.org/docs/fswa-queue-processed/","isPartOf":{"@type":"WebSite","name":"WP Webhooks","url":"https://wpwebhooks.org"},"about":{"@type":"SoftwareApplication","name":"Webhook Actions","applicationCategory":"WordPress Plugin"}}
```
