---
title: Add custom schedule to scanner
canonical: https://wpsecurityninja.com/docs/scheduled-scanner/add-custom-schedule-to-scanner/
---
You can add extra schedule intervals for **Security Ninja → Scheduler** with the WordPress `cron_schedules` filter.

Add the code below to a child theme’s `functions.php` or a small custom plugin. This example adds a “once every two weeks” interval.

Save the code, then reload the Scheduler settings page and choose the new schedule.

```php
add_filter( 'cron_schedules', 'cron_add_twice_monthly' );

function cron_add_twice_monthly( $schedules ) {
   // Adds once every two weeks to the existing schedules.
   $schedules['everytwoweeks'] = array(
       'interval' => 1209600,
       'display' => __( 'Once Every Two Weeks' )
   );
   return $schedules;
}
```

![Once Every Two Weeks Scheduled Scan](https://wpsecurityninja.com/media/2022/07/once-every-two-weeks-scheduled-scan.webp)

WordPress reference: [cron_schedules](https://developer.wordpress.org/reference/hooks/cron_schedules/).

Need help adding custom code? See [Add custom code to your website](https://wpsecurityninja.com/docs/installation-and-usage/custom-code-website/).
