---
title: "WordPress Cron Job Generator: Crontab Line for WP-Cron"
description: "Free crontab generator for WordPress: pick an interval and wget, curl or WP-CLI, then copy the exact cron job line, wp-config constant and crontab command."
url: "https://wpwebhooks.org/tools/wordpress-cron-job-generator/"
date: "2026-09-19"
---

[WP Webhooks](https://wpwebhooks.org/)/ [Tools](https://wpwebhooks.org/tools/)/ WordPress cron job generator

# Crontab generator for WordPress cron jobs

Pick how often and how, and copy the three things a real WordPress cron job needs: the wp-config constant, the command that opens the right crontab, and the line to paste into it.

Runs in your browser / Nothing is sent anywhere / Checked against WordPress 7.1

minute  hour  day-of-month  month  day-of-week  command

Site URL

The WordPress address, including a subdirectory if the install lives in one.

How to trigger it

wget curl WP-CLI

HTTP request. Present on most Linux servers.

How often

Only even divisions of the hour. \*/7 would fire at :56 and again at :00.

Start at minute 0

Several sites on one server? Give each a different start so they do not all fire in the same second.

Whose crontab

An HTTP request works from any user. Pick the one you can actually edit.

Skip a run if the last one is still going — wraps the command in `flock -n`. Linux only. Keep a log — appends output to `/tmp/wp-cron.log` instead of discarding it. For debugging; turn it off again afterwards.

Schedule

\*/5 \* \* \* \*

Every 5 minutes, at :00, :05, :10, :15 … past each hour. 60 ÷ 5 × 24 = 288 runs a day. A scheduled WordPress event can be up to 5 minutes late.

1 — wp-config.php, above “That's all, stop editing”

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

2 — open the crontab

```
crontab -e
```

3 — paste this line, save and exit

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

4 — check it

```
# the line is installed
crontab -l

# cron is firing it (Debian/Ubuntu; on RHEL use: journalctl -u crond)
grep CRON /var/log/syslog | tail
```

## Why WordPress needs a real cron job

WP-Cron is not a scheduler. It is a check that runs when somebody loads a page: if an event is due, WordPress fires a background request at `wp-cron.php`. No visitors means no check, so on a quiet site a task scheduled for 02:00 runs when the first person shows up at 09:00. On a busy site the opposite happens and the check runs on every request.

A system cron job replaces the visitor with a clock. The constant in step 1 turns the page-load check off; the line in step 3 calls `wp-cron.php` on a fixed schedule instead. The failure modes, the Site Health warnings and the debugging commands are covered in [why WP-Cron fails and how to fix it](https://wpwebhooks.org/blog/cron-job-for-wordpress/).

## No shell access?

Most hosting control panels have a Cron Jobs screen. Choose the interval from their dropdowns and paste only the command — everything after the five schedule fields — into the command box. Step 1 still applies.

If the host offers no cron at all, something outside the server has to make the request. [External cron services](https://wpwebhooks.org/blog/wordpress-external-cron-services/) do that, several of them free. If you run webhooks, the [External Cron in Webhook Actions Pro](https://wpwebhooks.org/docs/external-cron/) is the managed version: it pings `wp-cron.php` as often as every 60 seconds, or the plugin's own delivery queue as often as every 20, writes `DISABLE_WP_CRON` for you, and shows a heartbeat history in wp-admin.

**Three things that break a correct cron line.**

-   **A `%` anywhere in it.** crontab reads an unescaped percent sign as a newline. This tool refuses URLs that would need one.
-   **A short `PATH`.** cron does not load your shell profile, so `wp` and `php` are often not found. That is why the WP-CLI option asks for an absolute path.
-   **The wrong user.** Every user has a separate crontab. A line added with `sudo crontab -e` lives in root's, not yours, and `crontab -l` will not show it.

/FAQ

## Questions about WordPress cron jobs.

Behaviour described here was checked against wp-cron.php in WordPress 7.1.

What crontab line runs WordPress cron every 5 minutes? +

\*/5 \* \* \* \* wget -q -O - "https://example.com/wp-cron.php?doing\_wp\_cron" >/dev/null 2>&1 — with your own domain. The five fields are minute, hour, day of month, month and day of week, and \*/5 in the minute field means every fifth minute. Add define( 'DISABLE\_WP\_CRON', true ); to wp-config.php so WordPress stops triggering cron from page loads as well.

How often should a WordPress cron job run? +

As often as the most time-sensitive task on the site needs. A scheduled event cannot run earlier than the next time wp-cron.php is called, so a 5-minute cron job means an event can be up to 5 minutes late and a 15-minute job up to 15. Every minute is safe: a run with nothing due costs one WordPress bootstrap, about the same as a cheap page view, and then exits.

Does DISABLE\_WP\_CRON stop scheduled events from running? +

No. It only stops WordPress from spawning a cron request during ordinary page loads. wp-cron.php still runs every due event whenever something requests it, which is exactly what the system cron job does. The risk is setting the constant without adding the cron job: then nothing calls wp-cron.php and no scheduled event runs at all.

Should I use wget, curl or WP-CLI for the WordPress cron job? +

wget and curl make an HTTP request to wp-cron.php, so they work from any machine but depend on the site being reachable: a firewall, HTTP basic auth, a bad certificate or a maintenance page all break them. WP-CLI runs due events inside a PHP command-line process on the server with no HTTP involved, which avoids those problems and web-server timeouts, but it must be installed and cron needs its absolute path.

Is the ?doing\_wp\_cron parameter required? +

No. WordPress checks whether doing\_wp\_cron carries a value; with an empty value or no parameter at all it treats the request as coming from an external job and takes its own lock before running events. Most hosting guides include it by convention, so this tool does too, but wp-cron.php on its own behaves the same.

Why is my WordPress cron job not running? +

The usual causes: the crontab belongs to a different user than you think (list it with crontab -l for that user); cron runs with a minimal PATH, so wp or php is not found unless you give the absolute path; the HTTP request is blocked by basic auth, a firewall or a redirect; or the line contains a % character, which crontab treats as a newline. Turn on the log option here and read the file after the next run.

What if I have no SSH access to set up a cron job? +

Most control panels have a Cron Jobs screen: choose the interval there and paste only the command part, without the five schedule fields. If the host offers no cron at all, an external service has to request wp-cron.php on a schedule instead. Webhook Actions Pro includes a managed External Cron that does this from outside the server, with a heartbeat history inside wp-admin.

/Ready

## Your next automation is  
one sentence away.

[Install Plugin→](https://downloads.wordpress.org/plugin/flowsystems-webhook-actions.zip) [Try the Live Preview](https://playground.wordpress.net/?blueprint-url=https://wpwebhooks.org/blueprint.json) [See the Plugin →](https://wpwebhooks.org/wordpress-webhook-plugin/)

$ wp plugin install flowsystems-webhook-actions --activate

## Structured data

```json
{"@context":"https://schema.org","@type":"WebApplication","name":"WordPress Cron Job Generator","url":"https://wpwebhooks.org/tools/wordpress-cron-job-generator/","applicationCategory":"DeveloperApplication","operatingSystem":"Any","browserRequirements":"Requires JavaScript","inLanguage":"en","description":"Free crontab generator for WordPress: pick an interval and wget, curl or WP-CLI, then copy the exact cron job line, wp-config constant and crontab command.","datePublished":"2026-09-19","dateModified":"2026-09-19","isAccessibleForFree":true,"image":{"@type":"ImageObject","url":"https://wpwebhooks.org/tools/wordpress-cron-job-generator/og_image.jpg","width":1200,"height":630},"offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"featureList":["Crontab line for wp-cron.php via wget, curl or WP-CLI","Intervals from every minute to hourly, limited to even divisions of the hour","Minute offset to stagger several WordPress sites on one server","Optional flock guard against overlapping runs and optional log file","Matching DISABLE_WP_CRON constant and crontab -e command for the right user"],"publisher":{"@type":"Organization","name":"WP Webhooks","url":"https://wpwebhooks.org"}}

{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"WP Webhooks","item":"https://wpwebhooks.org/"},{"@type":"ListItem","position":2,"name":"Tools","item":"https://wpwebhooks.org/tools/"},{"@type":"ListItem","position":3,"name":"WordPress Cron Job Generator","item":"https://wpwebhooks.org/tools/wordpress-cron-job-generator/"}]}

{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What crontab line runs WordPress cron every 5 minutes?","acceptedAnswer":{"@type":"Answer","text":"*/5 * * * * wget -q -O - \"https://example.com/wp-cron.php?doing_wp_cron\" >/dev/null 2>&1 — with your own domain. The five fields are minute, hour, day of month, month and day of week, and */5 in the minute field means every fifth minute. Add define( 'DISABLE_WP_CRON', true ); to wp-config.php so WordPress stops triggering cron from page loads as well."}},{"@type":"Question","name":"How often should a WordPress cron job run?","acceptedAnswer":{"@type":"Answer","text":"As often as the most time-sensitive task on the site needs. A scheduled event cannot run earlier than the next time wp-cron.php is called, so a 5-minute cron job means an event can be up to 5 minutes late and a 15-minute job up to 15. Every minute is safe: a run with nothing due costs one WordPress bootstrap, about the same as a cheap page view, and then exits."}},{"@type":"Question","name":"Does DISABLE_WP_CRON stop scheduled events from running?","acceptedAnswer":{"@type":"Answer","text":"No. It only stops WordPress from spawning a cron request during ordinary page loads. wp-cron.php still runs every due event whenever something requests it, which is exactly what the system cron job does. The risk is setting the constant without adding the cron job: then nothing calls wp-cron.php and no scheduled event runs at all."}},{"@type":"Question","name":"Should I use wget, curl or WP-CLI for the WordPress cron job?","acceptedAnswer":{"@type":"Answer","text":"wget and curl make an HTTP request to wp-cron.php, so they work from any machine but depend on the site being reachable: a firewall, HTTP basic auth, a bad certificate or a maintenance page all break them. WP-CLI runs due events inside a PHP command-line process on the server with no HTTP involved, which avoids those problems and web-server timeouts, but it must be installed and cron needs its absolute path."}},{"@type":"Question","name":"Is the ?doing_wp_cron parameter required?","acceptedAnswer":{"@type":"Answer","text":"No. WordPress checks whether doing_wp_cron carries a value; with an empty value or no parameter at all it treats the request as coming from an external job and takes its own lock before running events. Most hosting guides include it by convention, so this tool does too, but wp-cron.php on its own behaves the same."}},{"@type":"Question","name":"Why is my WordPress cron job not running?","acceptedAnswer":{"@type":"Answer","text":"The usual causes: the crontab belongs to a different user than you think (list it with crontab -l for that user); cron runs with a minimal PATH, so wp or php is not found unless you give the absolute path; the HTTP request is blocked by basic auth, a firewall or a redirect; or the line contains a % character, which crontab treats as a newline. Turn on the log option here and read the file after the next run."}},{"@type":"Question","name":"What if I have no SSH access to set up a cron job?","acceptedAnswer":{"@type":"Answer","text":"Most control panels have a Cron Jobs screen: choose the interval there and paste only the command part, without the five schedule fields. If the host offers no cron at all, an external service has to request wp-cron.php on a schedule instead. Webhook Actions Pro includes a managed External Cron that does this from outside the server, with a heartbeat history inside wp-admin."}}]}
```
