| 1 |
filetype: crontab |
| 2 |
|
| 3 |
detect: |
| 4 |
filename: "crontab$|/tmp/crontab\\.\\w+$" |
| 5 |
header: "^#.*?/etc/crontab" |
| 6 |
|
| 7 |
rules: |
| 8 |
# The time and date fields are: |
| 9 |
# field allowed values |
| 10 |
# ----- -------------- |
| 11 |
# minute 0-59 |
| 12 |
# hour 0-23 |
| 13 |
# day of month 0-31 |
| 14 |
# month 0-12 (or names, see below) |
| 15 |
# day of week 0-7 (0 or 7 is Sun, or use names) |
| 16 |
|
| 17 |
- statement: "^([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+(([\\*0-9,\\-\\/]+)|(\\b(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\\b))\\s+(([\\*0-9,\\-\\/]+)|(\\b(sun|mon|tue|wed|thu|fri|sat)\\b))\\s+(.*)$\\n?" |
| 18 |
- constant: "^([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+(([\\*0-9,\\-\\/]+)|(\\b(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\\b))\\s+(([\\*0-9,\\-\\/]+)|(\\b(sun|mon|tue|wed|thu|fri|sat)\\b))" |
| 19 |
|
| 20 |
# Shell Values |
| 21 |
- type: "^[A-Z]+\\=" |
| 22 |
|
| 23 |
# Months and weekday keywords |
| 24 |
- constant: "\\b(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\\b" |
| 25 |
- constant: "\\b(sun|mon|tue|wed|thu|fri|sat)\\b" |
| 26 |
- type: "\\@(reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)\\b" |
| 27 |
|
| 28 |
# Conditionals |
| 29 |
- special: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|^|!|=|&|\\|)" |
| 30 |
|
| 31 |
- comment: |
| 32 |
start: "#" |
| 33 |
end: "$" |
| 34 |
rules: |
| 35 |
- todo: "(TODO|XXX|FIXME):?" |
| 36 |
|