WP Webhooks/ 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

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

How to trigger it

HTTP request. Present on most Linux servers.

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

0

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

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

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.

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 do that, several of them free. If you run webhooks, the External Cron in Webhook Actions Pro 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.

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