summaryrefslogtreecommitdiff
path: root/docs/configuration/system/task-scheduler.md
blob: 378a648d7954b403215cc136bda47e0f91b92b7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
(task-scheduler)=

# Task Scheduler

The task scheduler allows you to execute tasks on a given schedule. It makes
use of UNIX [cron].

:::{note}
All scripts excecuted this way are executed as root user - this may
be dangerous. Together with {ref}`command-scripting` this can be used for
automating (re-)configuration.
:::

```{eval-rst}
.. cfgcmd:: set system task-scheduler task <task> interval <interval>

   Specify the time interval when `<task>` should be executed. The interval
   is specified as number with one of the following suffixes:

   * ``none`` - Execution interval in minutes
   * ``m`` - Execution interval in minutes
   * ``h`` - Execution interval in hours
   * ``d`` - Execution interval in days

   .. note:: If suffix is omitted, minutes are implied.
```

```{eval-rst}
.. cfgcmd:: set system task-scheduler task <task> crontab-spec <spec>

   Set execution time in common cron_ time format. A cron `<spec>` of
   ``30 */6 * * *`` would execute the `<task>` at minute 30 past every 6th hour.
```

```{eval-rst}
.. cfgcmd:: set system task-scheduler task <task> executable path <path>

   Specify absolute `<path>` to script which will be run when `<task>` is
   executed.
```

```{eval-rst}
.. cfgcmd:: set system task-scheduler task <task> executable arguments <args>

   Arguments which will be passed to the executable.
```

[cron]: https://en.wikipedia.org/wiki/Cron