---
title: "fswa_cron_token_regenerated — Action Hook"
description: "Fires immediately after the external cron secret is regenerated."
url: "https://wpwebhooks.org/docs/fswa-cron-token-regenerated/"
---

[WP Webhooks](https://wpwebhooks.org/) / [Docs](https://wpwebhooks.org/docs/) / fswa\_cron\_token\_regenerated

Action since v1.14.0

# fswa\_cron\_token\_regenerated

Fires immediately after the external cron secret is regenerated.

/ Signature

```
do_action( 'fswa_cron_token_regenerated' )
```

/ When it fires

Fires inside `DispatcherController::regenerateCronToken()` after the new secret has been written to the database, before the REST response is returned. The Pro plugin hooks into this action to rebuild the Uptime Kuma monitor URL so the next ping uses the updated token.

/ Examples

Sync an external monitoring URL after cron token rotation

```
add_action( 'fswa_cron_token_regenerated', function () {
    $new_token = get_option( 'fswa_cron_secret' );
    $monitor_url = add_query_arg( 'token', $new_token, 'https://monitoring.example.com/ping' );
    update_option( 'my_monitor_url', $monitor_url );
} );
```

/ Related

[fswa\_glue\_post\_dispatch](https://wpwebhooks.org/docs/fswa-glue-post-dispatch/)[Developer Extensibility](https://wpwebhooks.org/docs/developer-extensibility/)[External Cron](https://wpwebhooks.org/docs/external-cron/)

/Ready

## Your next automation is  
one sentence away.

[Install Plugin→](https://wordpress.org/plugins/flowsystems-webhook-actions/) [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_cron_token_regenerated — Action Hook — Webhook Actions Docs","description":"Fires immediately after the external cron secret is regenerated.","url":"https://wpwebhooks.org/docs/fswa-cron-token-regenerated/","isPartOf":{"@type":"WebSite","name":"WP Webhooks","url":"https://wpwebhooks.org"},"about":{"@type":"SoftwareApplication","name":"Webhook Actions","applicationCategory":"WordPress Plugin"}}
```
