From b9215690439b186e09c04e1f621e3fcf2f285e62 Mon Sep 17 00:00:00 2001 From: kelseiv <47797004+kelseiv@users.noreply.github.com> Date: Thu, 8 Jul 2021 12:39:08 -0700 Subject: [PATCH] Update task-options.md --- .../influxdb/v2.0/process-data/task-options.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/content/influxdb/v2.0/process-data/task-options.md b/content/influxdb/v2.0/process-data/task-options.md index c1b7abf87..880739da9 100644 --- a/content/influxdb/v2.0/process-data/task-options.md +++ b/content/influxdb/v2.0/process-data/task-options.md @@ -40,10 +40,22 @@ option task = { ## every -The interval at which the task runs. This option also determines when the task first starts to run, depending on the specified time +The interval at which the task runs. This option also determines when the task first starts to run, depending on the specified time, which must be a [duration literal](/influxdb/cloud/reference/flux/language/lexical-elements/#duration-literals). -For example, if you save or schedule a task at 2:30 and specify the task should run every hour (`1h`), the task first executes at 3:00pm, and subsequently every hour after that. -option task = {name: "aggregation", every: 1h} +_**Data type:** Duration_ + +```js +option task = { + // ... + every: 1h, +} +``` + +For example, if you save or schedule a task at 2:30 and run 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.