Cron job
A command a computer runs on its own on a schedule, like every night at 3 a.m.
Cron is a scheduler that has come with Unix-like systems since the 1970s. Its job is to run commands at set times. Each scheduled task is a cron job: back up the database every night, send a report every Monday, clean out old files every hour. The list of jobs lives in a file called the crontab.
Every job has a schedule written as five fields: minute, hour, day of the month, month and day of the week. An asterisk means "any". So 0 3 * * * means "at minute 0 of hour 3, every day", and */15 * * * * means every fifteen minutes. The notation is compact and famously easy to get wrong, so people often check it with an online tool before saving.
The idea outlived the tool. Cloud schedulers, Kubernetes, GitHub Actions and many hosting platforms let you schedule tasks with the same cron syntax. Two classic traps: the schedule runs in the server's time zone, which may not be yours, and a failed cron job makes no noise unless someone set up logs or alerts to notice.
Keep in mind
- A cron job is a command scheduled to run automatically.
- Schedules use five fields: minute, hour, day of month, month, day of week.
0 3 * * *means every day at 3:00.- Check the time zone and add alerts: failures are silent by default.