Merge pull request #2820 from influxdata/fix-every

add example for the task every option
pull/2823/head
mluu12 2021-07-08 12:58:19 -07:00 committed by GitHub
commit fc6890d086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -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 %}}