A cron job is a task that a system runs automatically on a schedule. The name comes from cron, the scheduler built into Unix-like operating systems. You give it a command and a schedule, and the system runs the command at the right times without anyone starting it: nightly backups, clearing old files, sending reports, syncing data or publishing a post at a set hour.
The schedule is written as a short expression of five fields: minute, hour, day of month, month and day of week. For example, 0 3 * * * means every day at 3:00 in the morning. An asterisk means every value, and you can use lists, ranges and steps, such as every ten minutes.
In web work the idea shows up in several forms. Traditional servers run real cron. WordPress uses its own pseudo-cron, which only runs when someone visits the site, so a scheduled post on a quiet site can go out late unless a real cron job triggers it. Many hosting and deployment platforms offer a scheduled-jobs feature that calls a URL or function at set times, with limits that depend on the platform and plan. On shared hosting, cron is often available through the control panel, sometimes with a minimum interval.
Common mistakes are mixing up time zones, writing a schedule that runs more often than intended and forgetting that a job needs logging, since it fails silently. Jobs should also be safe to run twice.
An example: a cron job calls a publish script every five minutes and publishes any article whose scheduled time has passed.
Related: shared hosting, Vercel, static site generation, caching plugin