more WIP task content

pull/20/head
Scott Anderson 2019-01-17 23:04:56 -07:00
parent ac4b488fa4
commit c7a0863550
6 changed files with 48 additions and 14 deletions

View File

@ -24,12 +24,16 @@ It accepts either a file path or raw Flux.
###### Create a task using a file
```sh
influx task create --org=org-name @/path/to/task-script.flux
# Pattern
influx task create --org <org-name> @</path/to/task-script>
# Example
influx task create --org my-org @/tasks/cq-mean-1h.flux
```
###### Create a task using raw Flux
```sh
influx task create --org=org-name - # <return> to open stdin pipe
influx task create --org my-org - # <return> to open stdin pipe
options task = {
name: "task-name",

View File

@ -15,7 +15,13 @@ menu:
## Delete a task with the `influx` CLI
Use the `influx task delete` command to delete a task.
It requires a task ID, which is available in the output of `influx task find`.
```sh
influx task delete -i task-id
# Pattern
influx task delete -i <task-id>
# Example
influx task delete -i 0343698431c35000
```

View File

@ -15,7 +15,23 @@ menu:
## Update a task with the `influx` CLI
Use the `influx task update` command to update or change the status of an existing tasks.
It requires a task ID which is available in the output of `influx task find`.
###### Update a task's Flux script
```sh
influx task update -i task-id --status task-status
# Pattern
influx task update -i <task-id> @/path/to/updated-task-script
# Example
influx task update -i 0343698431c35000 @/tasks/cq-mean-1h.flux
```
###### Update the status of a task
```sh
# Pattern
influx task update -i <task-id> --status < active | inactive >
# Example
influx task update -i 0343698431c35000 --status inactive
```

View File

@ -15,7 +15,11 @@ menu:
## View tasks with the `influx` CLI
Use the `influx task find` command to return a list of created tasks.
```sh
influx task find -i task-id -n user-id --limit=100 --org-id=organization-id
influx task find
```
_Other filtering options such as filtering by organization or user, or limiting the number of tasks returned are available.
See the [`influx task find` documentation](#) for information about other available flags._

View File

@ -31,8 +31,8 @@ _**Data type:** String_
```js
options task = {
// ...
name: "taskName",
// ...
}
```
@ -43,17 +43,21 @@ _**Data type:** Duration_
```js
options task = {
// ...
every: 1h,
}
```
## cron
The cron schedule on which the task runs. Cron execution is based on system time.
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_
```js
options task = {
// ...
cron: "0 * * * *",
}
```
@ -63,7 +67,7 @@ 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 to allow late data to come in before executing the task.
A common use case is offsetting execution to account for data that may arrive late.
_**Data type:** Duration_
@ -75,9 +79,9 @@ options task = {
```
## concurrency
The number task executions that can run concurrently.
If the concurrency limit is reached, all subsequent executions of the task are be queued
until other running task executions complete.
The number task of executions that can run concurrently.
If the concurrency limit is reached, all subsequent executions are queued until
other running task executions complete.
_**Data type:** Integer_

View File

@ -46,15 +46,15 @@ _See [Task configuration options](/v2.0/process-data/task-options) for detailed
about each option._
{{% note %}}
**When creating a task in the InfluxDB user interface (UI)**, task options are not required
in your Flux script. They are defined in UI while creating the task.
If creating a task in the InfluxDB user interface (UI), task options are defined
in form fields when creating the task.
{{% /note %}}
## Define a data source
Define a data source using Flux's [`from()` function](#) or any other [Flux input functions](#).
For convenience, consider creating a variable that includes the sourced data with
the required `range()` and any relevant filters.
the required time range and any relevant filters.
```js
data = from(bucket: "telegraf/default")