Documentation

Task configuration options

Task options define specific information about a task. They are set in a Flux script , in the InfluxDB API, 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

In Flux:

option task = {
    name: "taskName",
    // ...
}

In a /api/v2/tasks request body with scriptID:

{
  "scriptID": "SCRIPT_ID",
  "name": "TASK_NAME"
  ...
}

Replace SCRIPT_ID with the ID of your InfluxDB invokable script.

every

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).

Data type: Duration

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.

In Flux:

option task = {
    // ...
    every: 1h,
}

In a /api/v2/tasks request body with scriptID:

{
  "scriptID": "SCRIPT_ID",
  "every": "1h"
  ...
}

In the InfluxDB UI, use the Interval field to set 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

In Flux:

option task = {
    // ...
    cron: "0 * * * *",
}

In a /api/v2/tasks request body with scriptID:

{
  "scriptID": "SCRIPT_ID",
  "cron": "0 * * * *",
  ...
}

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

In Flux:

option task = {
    // ...
    offset: 10m,
}

In a /api/v2/tasks request body with scriptID:

{
  "scriptID": "SCRIPT_ID",
  "offset": "10m",
  ...
}

Was this page helpful?

Thank you for your feedback!


New in InfluxDB 3.5

Key enhancements in InfluxDB 3.5 and the InfluxDB 3 Explorer 1.3.

See the Blog Post

InfluxDB 3.5 is now available for both Core and Enterprise, introducing custom plugin repository support, enhanced operational visibility with queryable CLI parameters and manual node management, stronger security controls, and general performance improvements.

InfluxDB 3 Explorer 1.3 brings powerful new capabilities including Dashboards (beta) for saving and organizing your favorite queries, and cache querying for instant access to Last Value and Distinct Value caches—making Explorer a more comprehensive workspace for time series monitoring and analysis.

For more information, check out:

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On November 3, 2025, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2

InfluxDB Cloud powered by TSM