]> git.proxmox.com Git - proxmox-backup.git/blame - docs/calendarevents.rst
docs: document new include/exclude paramenter
[proxmox-backup.git] / docs / calendarevents.rst
CommitLineData
ec1ae7e6 1.. _calendar-event-scheduling:
1eff9a1e
DC
2
3Calendar Events
4===============
5
6Introduction and Format
7-----------------------
8
9Certain tasks, for example pruning and garbage collection, need to be
34407477 10performed on a regular basis. `Proxmox Backup`_ Server uses a format inspired
1eff9a1e
DC
11by the systemd Time and Date Specification (see `systemd.time manpage`_)
12called `calendar events` for its schedules.
13
14`Calendar events` are expressions to specify one or more points in time.
3bbb70b3 15They are mostly compatible with systemd's calendar events.
1eff9a1e
DC
16
17The general format is as follows:
18
19.. code-block:: console
20 :caption: Calendar event
21
22 [WEEKDAY] [[YEARS-]MONTHS-DAYS] [HOURS:MINUTES[:SECONDS]]
23
24Note that there either has to be at least a weekday, date or time part.
25If the weekday or date part is omitted, all (week)days are included.
26If the time part is omitted, the time 00:00:00 is implied.
27(e.g. '2020-01-01' refers to '2020-01-01 00:00:00')
28
3bbb70b3 29Weekdays are specified with the abbreviated English version:
1eff9a1e
DC
30`mon, tue, wed, thu, fri, sat, sun`.
31
32Each field can contain multiple values in the following formats:
33
34* comma-separated: e.g., 01,02,03
35* as a range: e.g., 01..10
36* as a repetition: e.g, 05/10 (means starting at 5 every 10)
37* and a combination of the above: e.g., 01,05..10,12/02
38* or a `*` for every possible value: e.g., \*:00
39
2bc1250c 40There are some special values that have a specific meaning:
1eff9a1e
DC
41
42================================= ==============================
43Value Syntax
44================================= ==============================
45`minutely` `*-*-* *:*:00`
46`hourly` `*-*-* *:00:00`
47`daily` `*-*-* 00:00:00`
48`weekly` `mon *-*-* 00:00:00`
49`monthly` `*-*-01 00:00:00`
3bbb70b3 50`yearly` or `annually` `*-01-01 00:00:00`
1eff9a1e
DC
51`quarterly` `*-01,04,07,10-01 00:00:00`
52`semiannually` or `semi-annually` `*-01,07-01 00:00:00`
53================================= ==============================
54
55
56Here is a table with some useful examples:
57
58======================== ============================= ===================================
59Example Alternative Explanation
60======================== ============================= ===================================
61`mon,tue,wed,thu,fri` `mon..fri` Every working day at 00:00
62`sat,sun` `sat..sun` Only on weekends at 00:00
63`mon,wed,fri` -- Monday, Wednesday, Friday at 00:00
64`12:05` -- Every day at 12:05 PM
65`*:00/5` `0/1:0/5` Every five minutes
66`mon..wed *:30/10` `mon,tue,wed *:30/10` Monday, Tuesday, Wednesday 30, 40 and 50 minutes after every full hour
67`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
68`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
69`12,14,16,18,20,22:5` `12/2:5` Every day starting at 12:05 until 22:05, every 2 hours
70`*:*` `0/1:0/1` Every minute (minimum interval)
71`*-05` -- On the 5th day of every Month
72`Sat *-1..7 15:00` -- First Saturday each Month at 15:00
73`2015-10-21` -- 21st October 2015 at 00:00
74======================== ============================= ===================================
75
76
77Differences to systemd
78----------------------
79
80Not all features of systemd calendar events are implemented:
81
3bbb70b3 82* no Unix timestamps (e.g. `@12345`): instead use date and time to specify
1eff9a1e 83 a specific point in time
2bc1250c 84* no timezone: all schedules use the timezone of the server
1eff9a1e
DC
85* no sub-second resolution
86* no reverse day syntax (e.g. 2020-03~01)
87* no repetition of ranges (e.g. 1..10/2)
88
2bc1250c 89Notes on Scheduling
1eff9a1e
DC
90-------------------
91
34407477 92In Proxmox Backup, scheduling for most tasks is done in the
1eff9a1e 93`proxmox-backup-proxy`. This daemon checks all job schedules
2bc1250c 94every minute, to see if any are due. This means that even though
1eff9a1e 95`calendar events` can contain seconds, it will only be checked
2bc1250c 96once per minute.
1eff9a1e
DC
97
98Also, all schedules will be checked against the timezone set
34407477 99in the Proxmox Backup Server.