---
title: Run a task
description: Run a data processing task using the InfluxDB UI or the influx CLI.
url: https://docs.influxdata.com/influxdb/v2/process-data/manage-tasks/run-task/
estimated_tokens: 865
product: InfluxDB OSS v2
version: v2
publisher: InfluxData
canonical: https://docs.influxdata.com/influxdb/v2/process-data/manage-tasks/run-task/
date: '2026-04-20T11:26:19-05:00'
lastmod: '2026-04-20T11:26:19-05: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).

InfluxDB data processing tasks generally run in defined intervals or at a specific time,
however, you can manually run a task from the InfluxDB user interface (UI),
the `influx` command line interface (CLI),
or the InfluxDB `/api/v2` API.

## Run a task from the InfluxDB UI

1. In the navigation menu on the left, select **Tasks**.

   Tasks

2. Hover over the task you want to run and click the  icon.

3. Select **Run Task**.

## Run a task with the influx CLI

Use the `influx task run retry` command to run a task.

> [!Note]
> To run a task from the `influx` CLI, the task must have already run at least once.

#### Authentication credentials

The examples below assume your InfluxDB **host**, **organization**, and **token** are
provided by either the [active `influx` CLI configuration](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) or by environment variables (`INFLUX_HOST`, `INFLUX_ORG`, and `INFLUX_TOKEN`).
If you do not have a CLI configuration set up or the environment variables set, include these required credentials for each command with the following flags:

* `--host`: [InfluxDB host](/influxdb/v2/reference/urls/)
* `-o, --org` or `--org-id`: InfluxDB organization name or ID
* `-t, --token`: InfluxDB API token

```sh
# List all tasks to find the ID of the task to run
influx task list

# Use the task ID to list previous runs of the task
influx task run list --task-id=0000000000000000

# Use the task ID and run ID to retry a run
influx task run retry --task-id=0000000000000000 --run-id=0000000000000000
```

### Retry failed task runs

Use the [`influx task retry-failed` command](/influxdb/v2/reference/cli/influx/task/retry-failed/)to retry failed task runs.

```sh
# Retry failed tasks for a specific task
influx task retry-failed \
  --id 0000000000000000

# Print information about runs that will be retried
influx task retry-failed \
  --dry-run

# Retry failed task runs that occurred in a specific time range
influx task retry-failed \
  --after 2021-01-01T00:00:00Z \
  --before 2021-01-01T23:59:59Z
```

## Run a task with the InfluxDB API

Use the [`/tasks/TASK_ID/runs` InfluxDB API endpoint](/influxdb/v2/api/tasks//-taskID-/runs)to manually start a task run.

```
POST http://localhost:8086/api/v2/tasks/TASK_ID/runs
```

### Retry failed task runs

Use the [`/tasks/TASK_ID/runs/RUN_ID/retry` InfluxDB API endpoint](/influxdb/v2/api/tasks//-taskID-/runs/-runID-/retry)to retry a task run.

```
POST http://localhost:8086/api/v2/tasks/TASK_ID/runs/RUN_ID/retry
```

#### Related

* [influx task run](/influxdb/v2/reference/cli/influx/task/run/)
* [influx task run retry](/influxdb/v2/reference/cli/influx/task/run/retry/)
* [influx task retry-failed](/influxdb/v2/reference/cli/influx/task/retry-failed/)
* [/influxdb/v2/api/tasks/](/influxdb/v2/api/tasks/)
* [/influxdb/v2/api/tasks/](/influxdb/v2/api/tasks/)
