Cron Job
Quick Definition
A cron job is a scheduled task that runs automatically at set intervals. WordPress uses its own system called WP-Cron to handle things like publishing scheduled posts and checking for updates.

What Is a Cron Job?
A cron job is a task that runs automatically on a schedule — like a timer that triggers an action at a specific time or interval. The name comes from the cron utility on Linux and UNIX systems, which has been running scheduled tasks since the 1970s.
WordPress has its own scheduling system called WP-Cron. It powers core features you use every day without thinking about them:
- Publishing posts that you scheduled for a future date
- Checking for WordPress, theme, and plugin updates
- Deleting old transients from the database
- Sending scheduled emails (if a plugin uses WP-Cron for delivery)
The key difference between WP-Cron and a real server cron is how they are triggered. A server cron runs on a fixed schedule regardless of anything else — if you set it for 2:00 PM, it runs at 2:00 PM. WP-Cron, on the other hand, only checks for due tasks when someone visits your site. On every page load, WordPress looks at its list of scheduled tasks and runs anything that is overdue.
This means if you schedule a post for 2:00 PM but nobody visits your site until 5:00 PM, the post will not publish until that 5:00 PM visit. For most sites with regular traffic, this is not an issue. For low-traffic sites, it can cause delays.
Developers schedule WP-Cron tasks using two functions:
wp_schedule_event()— Run a task repeatedly at a set interval (hourly, daily, twice daily)wp_schedule_single_event()— Run a task once at a specific time
Both functions use WordPress hooks — you register a custom hook name and attach a function to it. When the scheduled time arrives and a page load triggers WP-Cron, your function executes.
Cron Jobs in Practice
Many plugins rely on WP-Cron: backup plugins schedule daily or weekly backups, SEO plugins schedule sitemap regeneration, and email marketing plugins schedule newsletter delivery. The WP Crontrol plugin (free) lets you view, edit, and manage all scheduled WP-Cron events from your dashboard — useful for debugging.
For sites where timing precision matters, most hosting providers let you replace WP-Cron with a real server cron. You disable WP-Cron in wp-config.php by adding define( 'DISABLE_WP_CRON', true ); and then set up a system cron job to hit wp-cron.php at regular intervals (typically every 5 or 15 minutes). This gives you reliable, traffic-independent scheduling.
Why It Matters
Understanding cron jobs helps you troubleshoot common WordPress issues — like scheduled posts not publishing on time or backups not running. It also helps you make informed decisions about your hosting: if you run a low-traffic site that relies on scheduled tasks, setting up a real server cron instead of WP-Cron can save you from missed schedules and frustrated users.