content/shared/influxdb-v2/process-data/manage-tasks/update-task.md
In the navigation menu on the left, select Tasks.
{{< nav-icon "tasks" "v2" >}}
Find the task you would like to edit and click the {{< icon "settings" >}} icon located far right of the task name.
Click Edit.
Click {{< caps >}}Save{{< /caps >}} in the upper right.
In the list of tasks, click the {{< icon "toggle" >}} toggle to the left of the task you want to activate or inactivate.
RETURN to update.Use the influx task update command to update or change the status of an existing task.
This command requires a task ID, which is available in the output of influx task list.
Pass the file path of your updated Flux script to the influx task update command
with the ID of the task you want to update.
Modified task options defined in the Flux
script are also updated.
# Syntax
influx task update -i <task-id> -f </path/to/updated-task-script>
# Example
influx task update -i 0343698431c35000 -f /tasks/cq-mean-1h.flux
Pass the ID of the task you want to update to the influx task update
command with the --status flag.
Possible arguments of the --status flag are active or inactive.
# Syntax
influx task update -i <task-id> --status < active | inactive >
# Example
influx task update -i 0343698431c35000 --status inactive
Use the /tasks/TASK_ID InfluxDB API endpoint to update properties of a task.
{{< api-endpoint method="PATCH" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID" api-ref="/influxdb/version/api/#operation/PatchTasksID" >}}
In your request, pass the task ID and an object that contains the updated key-value pairs.
To activate or inactivate a task, set the status property.
"status": "inactive" cancels scheduled runs and prevents manual runs of the task.
To find the task ID, see how to view tasks.
Once InfluxDB applies the update, it cancels all previously scheduled runs of the task.