Web apps & software

What is a cron job?

A cron job is a task scheduled to run automatically at set times on a server, for example sending appointment reminders every morning, generating invoices on the first of the month or backing up a database every night.

How schedules are written

Cron uses five fields for minute, hour, day of month, month and day of week. 0 7 * * * means every day at 07:00. Cloud platforms offer equivalent schedulers.

Avoiding silent failures

Cron jobs fail quietly. Log their output, alert someone when a job fails or does not run, make jobs safe to run twice, and note the server's time zone, a common source of reminders sent at the wrong hour.

Questions, answered

The name comes from Unix, but every platform has scheduled tasks.

Cloud schedulers that trigger functions on a timetable.

By the Stegnor team · Updated