Merge pull request #2820 from influxdata/fix-every
add example for the task every optionpull/2823/head
commit
fc6890d086
|
@ -40,7 +40,7 @@ option task = {
|
|||
|
||||
## every
|
||||
|
||||
The interval at which the task runs.
|
||||
The interval at which the task runs. This option also determines when the task first starts to run, depending on the specified time (in [duration literal](/influxdb/cloud/reference/flux/language/lexical-elements/#duration-literals)).
|
||||
|
||||
_**Data type:** Duration_
|
||||
|
||||
|
@ -51,6 +51,12 @@ option task = {
|
|||
}
|
||||
```
|
||||
|
||||
For example, if you save or schedule a task at 2:30 and run the task every hour (`1h`):
|
||||
|
||||
`option task = {name: "aggregation", every: 1h}`
|
||||
|
||||
The task first executes at 3:00pm, and subsequently every hour after that.
|
||||
|
||||
{{% note %}}
|
||||
In the InfluxDB UI, the **Interval** field sets this option.
|
||||
{{% /note %}}
|
||||
|
|
Loading…
Reference in New Issue