]>
Commit | Line | Data |
---|---|---|
a90b75d5 TL |
1 | ifdef::wiki[] |
2 | :title: Schedule Format | |
3 | endif::wiki[] | |
4 | ||
61529459 DC |
5 | [[chapter_calendar_events]] |
6 | Schedule Format | |
7 | --------------- | |
8 | ||
9 | {pve} has a very flexible scheduling configuration. It is based on the systemd | |
10 | time calendar event format.footnote:[see `man 7 systemd.time` for more information] | |
11 | Calendar events may be used to refer to one or more points in time in a | |
12 | single expression. | |
13 | ||
14 | Such a calendar event uses the following format: | |
15 | ||
16 | ---- | |
0ee99762 | 17 | [WEEKDAY] [[YEARS-]MONTHS-DAYS] [HOURS:MINUTES[:SECONDS]] |
61529459 DC |
18 | ---- |
19 | ||
20 | This format allows you to configure a set of days on which the job should run. | |
21 | You can also set one or more start times. It tells the replication scheduler | |
22 | the moments in time when a job should start. | |
23 | With this information we, can create a job which runs every workday at 10 | |
24 | PM: `'mon,tue,wed,thu,fri 22'` which could be abbreviated to: `'mon..fri | |
25 | 22'`, most reasonable schedules can be written quite intuitive this way. | |
26 | ||
27 | NOTE: Hours are formatted in 24-hour format. | |
28 | ||
29 | To allow a convenient and shorter configuration, one or more repeat times per | |
30 | guest can be set. They indicate that replications are done on the start-time(s) | |
31 | itself and the start-time(s) plus all multiples of the repetition value. If | |
32 | you want to start replication at 8 AM and repeat it every 15 minutes until | |
33 | 9 AM you would use: `'8:00/15'` | |
34 | ||
35 | Here you see that if no hour separation (`:`), is used the value gets | |
36 | interpreted as minute. If such a separation is used, the value on the left | |
37 | denotes the hour(s), and the value on the right denotes the minute(s). | |
38 | Further, you can use `*` to match all possible values. | |
39 | ||
40 | To get additional ideas look at | |
41 | xref:pvesr_schedule_format_examples[more Examples below]. | |
42 | ||
43 | Detailed Specification | |
44 | ---------------------- | |
45 | ||
0ee99762 | 46 | weekdays:: Days are specified with an abbreviated English version: `sun, mon, |
61529459 DC |
47 | tue, wed, thu, fri and sat`. You may use multiple days as a comma-separated |
48 | list. A range of days can also be set by specifying the start and end day | |
49 | separated by ``..'', for example `mon..fri`. These formats can be mixed. | |
50 | If omitted `'*'` is assumed. | |
51 | ||
52 | time-format:: A time format consists of hours and minutes interval lists. | |
53 | Hours and minutes are separated by `':'`. Both hour and minute can be list | |
54 | and ranges of values, using the same format as days. | |
55 | First are hours, then minutes. Hours can be omitted if not needed. In this | |
56 | case `'*'` is assumed for the value of hours. | |
57 | The valid range for values is `0-23` for hours and `0-59` for minutes. | |
58 | ||
59 | [[pvesr_schedule_format_examples]] | |
60 | Examples: | |
61 | ~~~~~~~~~ | |
62 | ||
0ee99762 DC |
63 | There are some special values that have a specific meaning: |
64 | ||
65 | .Special Values | |
66 | [width="100%",options="header"] | |
67 | |================================================================ | |
68 | |Value |Syntax | |
69 | |`minutely` |`*-*-* *:*:00` | |
70 | |`hourly` |`*-*-* *:00:00` | |
71 | |`daily` |`*-*-* 00:00:00` | |
72 | |`weekly` |`mon *-*-* 00:00:00` | |
73 | |`monthly` |`*-*-01 00:00:00` | |
74 | |`yearly` or `annually` | `*-01-01 00:00:00` | |
75 | |`quarterly` |`*-01,04,07,10-01 00:00:00` | |
76 | |`semiannually` or `semi-annually` |`*-01,07-01 00:00:00` | |
77 | |================================================================ | |
78 | ||
61529459 DC |
79 | .Schedule Examples |
80 | [width="100%",options="header"] | |
81 | |============================================================================== | |
82 | |Schedule String |Alternative |Meaning | |
83 | |mon,tue,wed,thu,fri |mon..fri |Every working day at 0:00 | |
84 | |sat,sun |sat..sun |Only on weekends at 0:00 | |
85 | |mon,wed,fri |-- |Only on Monday, Wednesday and Friday at 0:00 | |
86 | |12:05 |12:05 |Every day at 12:05 PM | |
87 | |*/5 |0/5 |Every five minutes | |
88 | |mon..wed 30/10 |mon,tue,wed 30/10 |Monday, Tuesday, Wednesday 30, 40 and 50 minutes after every full hour | |
89 | |mon..fri 8..17,22:0/15 |-- |Every working day every 15 minutes between 8 AM and 6 PM and between 10 PM and 11 PM | |
90 | |fri 12..13:5/20 |fri 12,13:5/20 |Friday at 12:05, 12:25, 12:45, 13:05, 13:25 and 13:45 | |
91 | |12,14,16,18,20,22:5 |12/2:5 |Every day starting at 12:05 until 22:05, every 2 hours | |
92 | |* |*/1 |Every minute (minimum interval) | |
0ee99762 DC |
93 | |*-05 |-- |On the 5th day of every Month |
94 | |Sat *-1..7 15:00 |-- |First Saturday each Month at 15:00 | |
95 | |2015-10-21 |-- |21st October 2015 at 00:00 | |
61529459 | 96 | |============================================================================== |