Documentation

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

In Flux:

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

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 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 * * * *",
}

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,
}

Was this page helpful?

Thank you for your feedback!


Set your InfluxDB URL

Linux Package Signing Key Rotation

All signed InfluxData Linux packages have been resigned with an updated key. If using Linux, you may need to update your package configuration to continue to download and verify InfluxData software packages.

For more information, see the Linux Package Signing Key Rotation blog post.

InfluxDB Cloud backed by InfluxDB IOx

All InfluxDB Cloud organizations created on or after January 31, 2023 are backed by the new InfluxDB IOx storage engine. Check the right column of your InfluxDB Cloud organization homepage to see which InfluxDB storage engine you’re using.

If powered by IOx, this is the correct documentation.

If powered by TSM, see the TSM-based InfluxDB Cloud documentation.

InfluxDB Cloud backed by InfluxDB TSM

All InfluxDB Cloud organizations created on or after January 31, 2023 are backed by the new InfluxDB IOx storage engine which enables nearly unlimited series cardinality and SQL query support. Check the right column of your InfluxDB Cloud organization homepage to see which InfluxDB storage engine you’re using.

If powered by TSM, this is the correct documentation.

If powered by IOx, see the IOx-based InfluxDB Cloud documentation.

State of the InfluxDB Cloud (IOx) documentation

The new documentation for InfluxDB Cloud backed by InfluxDB IOx is a work in progress. We are adding new information and content almost daily. Thank you for your patience!

If there is specific information you’re looking for, please submit a documentation issue.