added documentation and non special options. Breaking change

This commit is contained in:
nd 2020-06-11 00:17:39 +02:00
parent bade40d4d5
commit f8c19db61e
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
4 changed files with 76 additions and 10 deletions

44
README.md Normal file
View file

@ -0,0 +1,44 @@
# Cron
All configuration is to be placed inside the `cron` dict.
```
# <name>: *jobconfig*
jobs: {}
# defaults for all jobs, see *jobconfig*
defaults:
user: root
weekday: '*'
hour: '*'
minute: '*'
special_time: False
random_options:
weekday: "{{ range(6)|list }}"
hour: "{{ range(1, 22)|list }}"
minute: "{{ range(5, 50)|list }}"
```
**jobconfig**
```
# user to run job as
user: root
# weekday to run job at
weekday: '*'
# hour to run job at
hour: '*'
# minute to run job at
minute: '*'
# can be False or (mutaly exclusive with weekday/hour/minute) one of 'random_daily' or 'random_weekly'
special_time: False
# options if 'special_time' is not False
random_options:
weekday: "{{ range(6)|list }}"
hour: "{{ range(1, 22)|list }}"
minute: "{{ range(5, 50)|list }}"
```