---
title: Task configuration options
description: Task options define specific information about a task such as its name, the schedule on which it runs, execution delays, and others.
url: https://docs.influxdata.com/influxdb/v2/process-data/task-options/
estimated_tokens: 609
product: InfluxDB OSS v2
version: v2
publisher: InfluxData
canonical: https://docs.influxdata.com/influxdb/v2/process-data/task-options/
date: '2025-04-02T15:54:32-06:00'
lastmod: '2025-04-02T15:54:32-06:00'
---

This page documents an earlier version of InfluxDB OSS.[InfluxDB 3 Core](/influxdb3/core/) is the latest stable version.

#### API token hashing is enabled by default in InfluxDB OSS 2.9.0

Stronger token security: tokens are stored as hashes on disk, so a
copy of the database file doesn’t expose usable tokens. Existing
tokens are hashed on first startup and the original strings can’t
be recovered afterward — **capture any plaintext tokens you still
need before you upgrade**.

For more information, see [Token hashing](/influxdb/v2/admin/tokens/#token-hashing).

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:

* [name](#name)
* [every](#every)
* [cron](#cron)
* [offset](#offset)

> [!Note]
> `every` and `cron` are mutually exclusive, but at least one is required.

## name

The name of the task. ***Required***.

***Data type:** String*

In Flux:

```js
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](/flux/v0/spec/lexical-elements/#duration-literals)).

***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:

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

> [!Note]
> In the InfluxDB UI, use the **Interval** field to set this option.

## cron

The [cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that
defines the schedule on which the task runs.
Cron scheduling is based on system time.

***Data type:** String*

In Flux:

```js
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:

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

[tasks](/influxdb/v2/tags/tasks/)[flux](/influxdb/v2/tags/flux/)
