Commit | Line | Data |
---|---|---|
8659eb86 | 1 | # Cronjob Package Installation Plugin |
0b768461 | 2 | |
b27b12fb TD |
3 | Registers new cronjobs. |
4 | The cronjob schedular works similar to the `cron(8)` daemon, which might not available to web applications on regular webspaces. | |
5 | The main difference is that WoltLab Suite’s cronjobs do not guarantee execution at the specified points in time: | |
6 | WoltLab Suite’s cronjobs are triggered by regular visitors in an AJAX request, once the next execution point lies in the past. | |
7 | ||
8 | ## Components | |
9 | ||
10 | Each cronjob is described as an `<cronjob>` element with the mandatory attribute `name`. | |
11 | ||
12 | ### `<classname>` | |
13 | ||
14 | The name of the class providing the cronjob's behaviour, | |
15 | the class has to implement the `wcf\system\cronjob\ICronjob` interface. | |
16 | ||
17 | ### `<description>` | |
18 | ||
32f9f6c3 | 19 | !!! info "The `language` attribute is optional and should specify the [ISO-639-1](https://en.wikipedia.org/wiki/ISO_639-1) language code." |
b27b12fb TD |
20 | |
21 | Provides a human readable description for the administrator. | |
22 | ||
23 | ### `<start*>` | |
24 | ||
25 | All of the five `startMinute`, `startHour`, `startDom` (Day Of Month), `startMonth`, `startDow` (Day Of Week) are required. | |
26 | They correspond to the fields in `crontab(5)` of a cron daemon and accept the same syntax. | |
27 | ||
28 | ### `<canBeEdited>` | |
29 | ||
30 | Controls whether the administrator may edit the fields of the cronjob. | |
31 | ||
32 | ### `<canBeDisabled>` | |
33 | ||
34 | Controls whether the administrator may disable the cronjob. | |
35 | ||
36 | ### `<options>` | |
37 | ||
38 | The options element can contain a comma-separated list of options of which at least one needs to be enabled for the template listener to be executed. | |
39 | ||
40 | ## Example | |
41 | ||
9a3f5fa3 | 42 | {jinja{ codebox( |
f778fce2 MS |
43 | title="cronjob.xml", |
44 | language="xml", | |
45 | filepath="package/pip/cronjob.xml" | |
9a3f5fa3 | 46 | ) }} |