Открытие магазина: промокод LAUNCH20 — скидка 20% на всё до конца сентября
Каталог/Блог/WordPress cron: why your scheduled tasks silently fail

WordPress cron: why your scheduled tasks silently fail

2026-09-29 · Yodsira

WordPress cron is not cron. That single fact explains a whole category of "mysterious" failures: backups that did not run last night, scheduled posts that published late, cleanup tasks that quietly piled up. Nothing crashes, nothing logs an error — the work just does not happen, and you find out weeks later.

How WP-Cron actually works

Real cron is a clock in the operating system: every minute, on the dot, it wakes and runs what is due. WP-Cron is different: it runs when a visitor loads the site. Every page load, WordPress checks a list of scheduled tasks and runs whatever is overdue — during the visit.

Two consequences follow. First, a site with no traffic has no cron: a weekend shop with zero visitors on Sunday does not run its Sunday tasks until someone visits on Monday. Second, a site with heavy traffic runs cron too often — many parallel visitors, many parallel cron attempts, tasks overlapping and racing each other.

The three classic failure modes

  1. Low traffic. Tasks scheduled at night run the next afternoon — or never, if the schedule is "daily at 3:00" and nobody visits at the right time.
  2. Caching. A full-page cache serves visitors without waking PHP at all. Your cron list sits untouched behind the cache for hours.
  3. Long-running or stuck tasks. One task that hangs (an email to a dead server, an API that never answers) can block the queue. Everything behind it stays overdue, silently.

The standard fix — and its price

The usual advice is correct: disable WP-Cron and add one line of real system cron hitting wp-cron.php every five minutes. That fixes the traffic and caching problems at once. The remaining problem is visibility: real cron fires on schedule, but if a task itself fails or hangs, you still find out from consequences — the missing backup, the full disk, the customers who never got their emails.

What to check once a week

  • Are there overdue events right now? A few minutes is normal; hours is a smell.
  • Is there one event that has been overdue for days? That is your stuck task.
  • Did the tasks you care about (backup, digest, cleanup) actually complete in their window?

You can do all three by hand, or let a tool do it — our own Cron Control shows the full event list with overdue items in red, runs tasks without breaking schedules, and (in Pro) keeps run history and alerts on stuck events. Whatever you use, the habit is the point: cron failures are invisible by design, and the only cure is looking.

← Все статьи