---
title: Run action after broken links scan is completed
url: "https://www.seopress.org/support/hooks/run-action-after-broken-links-scan-is-completed/"
lang: en-US
updated: 2026-10-20
hook_name: seopress_broken_links_after_scan
required_version: 9.8
---

# Run action after broken links scan is completed

- **Hook name:** `seopress_broken_links_after_scan`
- **Required version:** 9.8

```php
<?php
/**
 * Fires once the broken links scan is finished (no parameter).
 */
function sp_after_broken_links_scan() {
	$duration = (int) get_option( 'seopress_pro_broken_links_scan_duration' );

	// Notify your monitoring tool, clear a cache, etc.
	error_log( 'Broken links scan finished in ' . $duration . 's' ); // phpcs:ignore
}
add_action( 'seopress_broken_links_after_scan', 'sp_after_broken_links_scan' );
```

Source: [https://gist.github.com/wp-seopress/f644aac25610c27c9be2a2588cf74270](https://gist.github.com/wp-seopress/f644aac25610c27c9be2a2588cf74270)



