Cron Cheatsheet

Expression Format

1
Minute  Hour Day  Mon  Weekday
1
*    *    *    *    *  command to be executed

Here is the textual form:

1
2
3
4
5
6
7
*    *    *    *    *
┬    ┬    ┬    ┬    ┬
│    │    │    │    └─  Weekday  (0=Sun .. 6=Sat)
│    │    │    └──────  Month    (1..12)
│    │    └───────────  Day      (1..31)
│    └────────────────  Hour     (0..23)
└─────────────────────  Minute   (0..59)

Crontab

1
2
# Adding tasks easily
echo "@reboot echo hi" | crontab
1
2
# Open in editor
crontab -e
1
2
# List tasks
crontab -l [-u user]