Home / Blog / Cron Jobs

Cron Jobs: A Complete Beginner's Tutorial

Published August 2026 · 5 min read

What Is a Cron Job?

A cron job is a scheduled task that runs automatically at a specified time or interval. The name comes from chronos, Greek for time. Cron is built into every Linux server and powers everything from backups to SSL certificate renewals.

The 5-Field Cron Expression

A cron expression has 5 fields separated by spaces:

minute  hour  day-of-month  month  day-of-week
  *       *        *           *        *

Common Examples

0 9 * * 1-5      # Every weekday at 9am
*/15 * * * *      # Every 15 minutes
0 0 1 * *         # First of every month at midnight
0 2 * * 0          # Every Sunday at 2am
30 4 1,15 * *     # 1st and 15th at 4:30am

Special Characters

Debugging Cron

The #1 cron mistake is timezone confusion. Server cron runs in UTC by default. If you schedule "0 9 * * *" expecting 9am your time, it runs at 9am UTC — which could be 2am your time. Always check date on the server first.

Second mistake: cron jobs have no PATH. Scripts that work when you run them manually may fail in cron because $PATH is different. Always use absolute paths: /usr/bin/python3 /home/myuser/script.py.

FAQ

What does * mean in cron?

* means 'every value'. * in minutes = every minute. * in hours = every hour.

How do I run something every 5 minutes?

Use */5 in the minute field: */5 * * * *

Does cron run when the server is off?

No. If the scheduled time passes while the server is down, the job is skipped. Use anacron for catchup jobs.

What timezone does cron use?

UTC by default on most servers, unless configured otherwise. Check with: date command.

Try Cron Builder →