Cron Jobs for Beginners — Complete Tutorial with Real Examples

What is Cron?

Cron is the Unix job scheduler. A cron expression is 5 fields telling the system exactly when to run a task: minute, hour, day-of-month, month, day-of-week.

The 5 Fields

┌ minute (0–59)
│ ┌ hour (0–23)
│ │ ┌ day of month (1–31)
│ │ │ ┌ month (1–12)
│ │ │ │ ┌ day of week (0–6, Sun=0)
30 9  *  *  1-5

That expression means: 9:30 AM, Monday–Friday.

Special Operators

Real-World Recipes

TaskExpression
Nightly backup 2 AM0 2 * * *
Report every Monday 9 AM0 9 * * 1
Cleanup 1st of month, midnight0 0 1 * *
Health check every 5 min*/5 * * * *

Try the Visual Builder

Play with our Cron Expression Builder — pick values from dropdowns and see the next 5 fire times instantly.

Common Gotchas

FAQ

How is @daily different from 0 0 * * *?

They're identical — @daily is just shorthand (on many systems).

How do I see logs?

Check /var/log/syslog or add 2>>&1 | logger -t myjob to your command.

💜 Free tools. Help keep them free.

☕ Buy Me a Coffee