-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcron.txt
29 lines (21 loc) · 869 Bytes
/
cron.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Crontab
SHELL = /bin/bash
* * * * *
0-59 | 0-23 | 1-31 | 1-12 | 1-6 | user /path/to/command
Min Hour Day Month Mon-Sat \
Sun: 0,7 system crontab only
- %s are newlines and need to be escaped:
% -> \%
- Ranges and steps:
*/5 → 0,5,10,15,20,25,30,35,40,45,50,55
1-56/5 → 1,6,11,16,21,26,31,36,41,46,51,56 (⇔ */5+1 ?)
- No $PATH as variables can't be de-referenced in cron
- No comments at EOL
- Make sure there is a new line after the last cron command
Anacron
-------
nb-days | delay after start | job-identifier | command
| | |
| | name for the job’s timestamp file (ex: /var/spool/anacron/fstrim.daily)
| minutes to wait before executing the job after the machine starts
7 (@weekly)