---
title: "Cron (and WP-Cron)"
description: "Cron and WP-Cron: how WordPress runs its scheduled tasks, why they fall behind and how to hand them over to the server's cron."
language: "en"
locale: "en-US"
type: "definition"
canonical: "https://www.wp-feint.com/glossary/cron-wp-cron/"
published: "2026-10-28T08:00:00+00:00"
modified: "2026-11-22T12:06:56+00:00"
translations:
  en-US: "https://www.wp-feint.com/glossary/cron-wp-cron/index.md"
  fr-FR: "https://www.wp-feint.com/fr/definitions/cron/index.md"
  es-ES: "https://www.wp-feint.com/es/glosario/cron/index.md"
  de-DE: "https://www.wp-feint.com/de/glossar/cron/index.md"
  it-IT: "https://www.wp-feint.com/it/glossario/cron-wp-cron/index.md"
  pt-BR: "https://www.wp-feint.com/pt/glossario/cron/index.md"
  nl-NL: "https://www.wp-feint.com/nl/woordenlijst/cron/index.md"
---

# Cron (and WP-Cron)

Cron is the job scheduler of Unix and Linux systems: it runs commands at set times based on a table called a crontab. WP-Cron is WordPress's built-in mechanism for scheduled tasks (publishing, updates, backups, emails); it has no clock of its own and only runs when a page loads.

The name comes from the Greek chronos, time. On a Linux server, the cron daemon reads job tables and runs each command at its scheduled time: a nightly backup, renewing a [Let’s Encrypt](https://www.wp-feint.com/glossary/lets-encrypt/) certificate, cleaning up temporary files. WordPress needs the same kind of service, but it can't count on access to the system cron, which some hosting plans don't provide. So it has its own mechanism, WP-Cron.

## Crontab syntax

Each line starts with five fields: minute (0 to 59), hour (0 to 23), day of the month (1 to 31), month (1 to 12) and day of the week (0 to 7, where both 0 and 7 mean Sunday), followed by the command. An asterisk means “every,” and `*/15` in the minute field runs the job at minutes 0, 15, 30 and 45.

```
*/15 * * * * command-every-15-minutes
0 3 * * * command-every-night-at-3am
```

## How WP-Cron works

According to the WordPress documentation, WP-Cron checks the list of scheduled tasks on every page load and runs the ones that are due. The default intervals are hourly, twicedaily, daily and weekly; plugins add others. This design has two consequences. If nobody visits the site, nothing runs: a task scheduled for 2:00 PM may wait until 5:00 PM, as the documentation points out. It isn't lost, though; it runs on the next visit. Conversely, on a busy site, the check happens constantly.

![Comparison between WP-Cron and the system cron. WP-Cron: triggered when a page loads, a task scheduled for 2 PM may wait for the next visit, a low-traffic site falls behind, a high-traffic site runs the check on every page, enabled by default with no setup. System cron: triggered by the server clock, at a regular interval, independent of traffic, enabled by defining DISABLE_WP_CRON in wp-config.php and adding a crontab line that runs wp cron event run --due-now or calls wp-cron.php.](https://www.wp-feint.com/media/2026/10/wp-cron-cron-systeme-en.webp)

This covers publishing scheduled posts, update checks and automatic updates, plugin backups, sending newsletters and security reports.

## Switching to the system cron

The approach recommended by the documentation is to turn off visit-based triggering in wp-config.php:

```
define( 'DISABLE_WP_CRON', true );
```

and then let the server's cron do the triggering, either with a request to wp-cron.php or, if your host provides [WP-CLI](https://www.wp-feint.com/glossary/wp-cli/), with a command that runs every due task while avoiding overlapping runs:

```
*/5 * * * * cd /path/to/site && wp cron event run --due-now --quiet
```

On [shared hosting](https://www.wp-feint.com/glossary/shared-hosting/), the control panel usually has a “Cron Jobs” section where you can add this line without a terminal.

*Video: “How to Setup External Cron Jobs in WordPress” (WP Speed Matters)*

## For WordPress

- **Keep a reasonable interval**, 5 to 15 minutes: running every minute puts needless load on a small server.
- **Check that the system job actually works** before you forget about it: once DISABLE_WP_CRON is defined, nothing runs at all if the crontab line is wrong. `wp cron event list` shows upcoming runs and reveals overdue tasks.
- **Watch out for copies**: on a [staging site](https://www.wp-feint.com/glossary/staging-environment/), scheduled tasks can email real customers or sync external data. Disable them or neutralize outgoing messages.
- **Scheduled backups** run by a plugin depend on WP-Cron: make sure they really happen, so you stick to your [backup strategy](https://www.wp-feint.com/glossary/3-2-1-backup-rule/).

## Common mistakes

An unknown task in the list of scheduled events deserves a closer look: some malicious code reinstalls itself through a scheduled task after every cleanup.

## Related terms

- [WP-CLI](https://www.wp-feint.com/glossary/wp-cli/)
- [Staging environment](https://www.wp-feint.com/glossary/staging-environment/)
- [Let's Encrypt](https://www.wp-feint.com/glossary/lets-encrypt/)
- [3-2-1 backup rule](https://www.wp-feint.com/glossary/3-2-1-backup-rule/)
- [Shared hosting](https://www.wp-feint.com/glossary/shared-hosting/)


## Sources

- [Plugin Handbook : Cron](https://developer.wordpress.org/plugins/cron/)
- [Plugin Handbook : Hooking WP-Cron Into the System Task Scheduler](https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/)
- [WP-CLI Commands : wp cron event run](https://developer.wordpress.org/cli/commands/cron/event/run/)
- [Linux manual page : crontab(5)](https://man7.org/linux/man-pages/man5/crontab.5.html)
