# Weekly and Monthly WP-Cron Schedules

> Adds "Once Weekly" and "Once Monthly" recurrences to WP-Cron so your own scheduled tasks, or plugins that offer a schedule picker, can run less often than daily.

- Type: PHP
- Runs: Run everywhere
- Category: [Developer](https://wpide.com/library/category/developer/)
- Tags: cron, schedules, wp-cron
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/cron-weekly-monthly-schedules/

## Code

```php
add_filter( 'cron_schedules', function ( $schedules ) {
    $schedules['wpide_weekly'] = array(
        'interval' => WEEK_IN_SECONDS,
        'display'  => __( 'Once Weekly' ),
    );
    $schedules['wpide_monthly'] = array(
        'interval' => MONTH_IN_SECONDS,
        'display'  => __( 'Once Monthly' ),
    );

    return $schedules;
} );
```

## Notes

Use the keys "wpide_weekly" and "wpide_monthly" with wp_schedule_event(); WordPress 5.4+ already has "weekly", which this keeps untouched.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Weekly and Monthly WP-Cron Schedules" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
