]> git.proxmox.com Git - pve-docs.git/blame - calendar-events.adoc
package repos: add Ceph 18.2 Reef repos
[pve-docs.git] / calendar-events.adoc
CommitLineData
a90b75d5
TL
1ifdef::wiki[]
2:title: Schedule Format
3endif::wiki[]
4
61529459
DC
5[[chapter_calendar_events]]
6Schedule Format
7---------------
8
9{pve} has a very flexible scheduling configuration. It is based on the systemd
10time calendar event format.footnote:[see `man 7 systemd.time` for more information]
11Calendar events may be used to refer to one or more points in time in a
12single expression.
13
14Such a calendar event uses the following format:
15
16----
0ee99762 17[WEEKDAY] [[YEARS-]MONTHS-DAYS] [HOURS:MINUTES[:SECONDS]]
61529459
DC
18----
19
20This format allows you to configure a set of days on which the job should run.
21You can also set one or more start times. It tells the replication scheduler
22the moments in time when a job should start.
23With this information we, can create a job which runs every workday at 10
24PM: `'mon,tue,wed,thu,fri 22'` which could be abbreviated to: `'mon..fri
2522'`, most reasonable schedules can be written quite intuitive this way.
26
27NOTE: Hours are formatted in 24-hour format.
28
29To allow a convenient and shorter configuration, one or more repeat times per
30guest can be set. They indicate that replications are done on the start-time(s)
31itself and the start-time(s) plus all multiples of the repetition value. If
32you want to start replication at 8 AM and repeat it every 15 minutes until
339 AM you would use: `'8:00/15'`
34
35Here you see that if no hour separation (`:`), is used the value gets
36interpreted as minute. If such a separation is used, the value on the left
37denotes the hour(s), and the value on the right denotes the minute(s).
38Further, you can use `*` to match all possible values.
39
40To get additional ideas look at
41xref:pvesr_schedule_format_examples[more Examples below].
42
43Detailed Specification
44----------------------
45
0ee99762 46weekdays:: Days are specified with an abbreviated English version: `sun, mon,
61529459
DC
47tue, wed, thu, fri and sat`. You may use multiple days as a comma-separated
48list. A range of days can also be set by specifying the start and end day
49separated by ``..'', for example `mon..fri`. These formats can be mixed.
50If omitted `'*'` is assumed.
51
52time-format:: A time format consists of hours and minutes interval lists.
53Hours and minutes are separated by `':'`. Both hour and minute can be list
54and ranges of values, using the same format as days.
55First are hours, then minutes. Hours can be omitted if not needed. In this
56case `'*'` is assumed for the value of hours.
57The valid range for values is `0-23` for hours and `0-59` for minutes.
58
59[[pvesr_schedule_format_examples]]
60Examples:
61~~~~~~~~~
62
0ee99762
DC
63There 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|==============================================================================