Just a reference basePosts RSS Comments RSS

a quick crontab howto

A Quick Using Crontab HowTo

Crontab -e

1
2
3
4
5
6
7
* * * * * <command>
| | | | |
| | | | +----- Day of week(0-6, 0 = Sun)
| | | +------- Month (1-12)
| | +--------- Day of month (1-31)
| +----------- Hour (0-23)
+------------- Min (0-59)

examples

1
2
0 1 * * 1,2,3 /opt/bin/script1.sh
0 1 * * 1-3 /opt/bin/script1.sh

Both options will run the script at 01:00 on Mon, Tue and Wed.

No responses yet

Comments are closed.