Task configuration options

Task options define specific information about a task. They are set in a Flux script or in the InfluxDB user interface (UI). The following task options are available:

every and cron are mutually exclusive, but at least one is required.

name

The name of the task. Required.

*Data type: String*

  1. options task = {
  2. name: "taskName",
  3. // ...
  4. }

every

The interval at which the task runs.

*Data type: Duration*

  1. options task = {
  2. // ...
  3. every: 1h,
  4. }

In the InfluxDB UI, the Interval field sets this option.

cron

The cron expression that defines the schedule on which the task runs. Cron scheduling is based on system time.

*Data type: String*

  1. options task = {
  2. // ...
  3. cron: "0 * * * *",
  4. }

offset

Delays the execution of the task but preserves the original time range. For example, if a task is to run on the hour, a 10m offset will delay it to 10 minutes after the hour, but all time ranges defined in the task are relative to the specified execution time. A common use case is offsetting execution to account for data that may arrive late.

*Data type: Duration*

  1. options task = {
  2. // ...
  3. offset: 10m,
  4. }

concurrency

The number task of executions that can run concurrently. If the concurrency limit is reached, all subsequent executions are queued until other running task executions complete.

*Data type: Integer*

  1. options task = {
  2. // ...
  3. concurrency: 2,
  4. }

retry

The number of times to retry the task before it is considered as having failed.

*Data type: Integer*

  1. options task = {
  2. // ...
  3. retry: 2,
  4. }

tasks flux