RevealTheme logo
Back to Blog

WordPress And Common Cron Schedule Issues

WordPress And Common Cron Schedule Issues
The RevealTheme Team

By

··3 min read

WP-Cron handles WordPress's scheduled tasks: publishing scheduled posts, running plugin cron jobs, sending notifications. When it doesn't work, tasks queue but don't execute.

The diagnostic steps that identify why are specific. The fixes follow from understanding the cause.

Symptom 1: scheduled posts don't publish

A post scheduled for 8am is still showing as scheduled at 11am. The publishing didn't happen on time.

Cause typically: WP-Cron didn't run because no traffic hit the site. WP-Cron is triggered by page loads; sites without traffic don't trigger it.

Fix: replace WP-Cron with system cron that runs on a schedule regardless of traffic. Or, ensure consistent traffic (impractical for low-traffic sites).

Symptom 2: cron events accumulate but don't run

WP Crontrol shows many events in the queue with past "next run" times. They're due but haven't executed.

Cause: same as above (low traffic) or specific event errors.

Investigate: enable WordPress debug logging and watch for cron-related errors. The errors reveal what's failing.

Symptom 3: cron runs but specific tasks don't complete

The cron is running but a specific scheduled task isn't producing expected results.

Cause: the task's code has an error, or the task is hitting timeouts, or it depends on something that's not available.

Fix: investigate the specific task. Plugin support may help; the task's source code reveals what it tries to do.

The system cron alternative

Disable WP-Cron's request-based triggering:

define('DISABLE_WP_CRON', true);

Add a system cron job to call wp-cron.php on schedule:

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

The system cron runs every 5 minutes, processing any due tasks.

The hosting-specific considerations

Managed hosting (Kinsta, WP Engine) typically handles WP-Cron with system cron automatically. The reliability is good without intervention.

Shared hosting often relies on WP-Cron's default behavior. Low-traffic sites on shared hosting see the most problems.

Some shared hosts allow custom cron jobs; some don't. Verify before assuming.

The external trigger alternative

External services (EasyCron, cron-job.org, GitHub Actions) can hit wp-cron.php on schedule. The external service replaces the missing system cron.

Free tiers cover small sites; paid tiers handle higher volume.

The honest framing

WP-Cron is acceptable for sites with consistent traffic. For low-traffic sites or sites where scheduling reliability matters, the system cron alternative is worth implementing.

The investment is moderate; the reliability gain is significant.