Documentation

Run a task

This page documents an earlier version of InfluxDB. InfluxDB v2.6 is the latest stable version. View this page in the v2.6 documentation.

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.

  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.

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 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
  • -o, --org or --org-id: InfluxDB organization name or ID
  • -t, --token: InfluxDB API token
# 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 to retry failed task runs.

# 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 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 to retry a task run.

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

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.