WPMozo: add-ons and tools for WordPress and Elementor
⚡ WordPress · Client-side · No data sent to server

WordPress Cron Schedules

Reference for all built-in wp-cron recurrence schedules and a generator for custom intervals with ready-to-paste PHP code. Includes a seconds calculator. Everything runs in your browser.

Built-in Schedules

WordPress registers these four recurrence slugs by default. Pass the slug to wp_schedule_event() as the third argument.

Slug Display Name Interval Fires every Example

Custom Schedule Generator

Fill in the fields below and click Generate to get the complete PHP code for your functions.php.

Lowercase, underscores only. Auto-corrected as you type.
= 300 seconds

Seconds Calculator

Convert between a human-readable duration and raw seconds.

days
hours
min
sec
or
seconds
Copied to clipboard
100% private. All schedule lookups and code generation happen in your browser. Nothing you type is uploaded or logged.

About this tool

WordPress includes a built-in task scheduler called WP-Cron. It lets you schedule PHP callbacks to run on a recurring basis — useful for sending emails, cleaning up expired transients, syncing data with external APIs, and more.

Built-in schedules

Out of the box WordPress provides four recurrence slugs: hourly, twicedaily, daily, and weekly. You pass one of these slugs (or your own custom slug) as the third argument to wp_schedule_event().

Adding custom schedules

To add an interval that WordPress does not include (for example, every 5 minutes), hook into the cron_schedules filter and return an array containing your slug, its interval in seconds, and a human-readable display name. The generator above produces this code for you.

WP-Cron is pseudo-cron

WP-Cron does not watch the clock. Instead, WordPress checks for overdue scheduled events on every page request. On a quiet site with very little traffic, due tasks can sit waiting for the next visitor — so timing drifts. It works fine for most sites, but if you need precise intervals, use a real system cron.

Using a real server cron for reliability

1. Disable WordPress from triggering cron on page loads. Add this line to wp-config.php:

define( 'DISABLE_WP_CRON', true );

2. Add a crontab entry that fetches wp-cron.php on a fixed schedule (example: every 5 minutes):

*/5 * * * * wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Or with curl:

*/5 * * * * curl -s https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

This gives you predictable, traffic-independent task execution.

Cleanup on deactivation

Always remove your scheduled events when a plugin or theme is deactivated. The generated code above includes register_deactivation_hook with wp_unschedule_event to handle this automatically.

DiviExtended: premium Divi child themes and plugins