# Task and Instance Operation

The Operations Center provides management operations for tasks and instances. The tasks controlled by the Operations Center include manually triggered tasks and scheduled tasks, and their corresponding instances, for centralized management.

* Task: A file created in the IDE, which is referred to as a task after being submitted to the Operations Center.
* Instance: The specific running entity generated by manual execution of a file or scheduled task, referred to as an instance.

## Task Operation

### Task List

Click "Task Operations" in the left navigation to enter the task list page. The task list provides a summary display of tasks in all workspaces under the currently opened service.

![](.topwrite/assets/image_1710658403744.png)

^

#### Task List Content

In the list, you can view key attributes such as task name, task ID, workspace, task status, task type, etc.

#### Task List Operations

In the task list, you can perform quick operations by selecting one or more tasks.

**Single Task Operation**

| Operation Name | Operation Description                                                                                                                                                                                      |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Pause          | Only tasks that are not in the paused state can be operated. After the operation, the scheduling attribute of the task will be set to "Pause Scheduling", i.e., no longer generate and run task instances. |
| Start          | Only tasks in the paused state can be operated. After the operation, the scheduling attribute of the task will be restored to "Normal Scheduling", i.e., generate and run task instances.                  |
| Delete         | The operation takes the task offline from the Operations Center and reverts the task to the "Unsubmitted" state of the file.                                                                               |

**Batch Task Operation**

| Operation Name | Operation Description                                                                                     |
| -------------- | --------------------------------------------------------------------------------------------------------- |
| Batch Start    | Batch operation of selected tasks, restoring the scheduling attribute of the task to "Normal Scheduling". |
| Batch Pause    | Batch operation of selected tasks, setting the scheduling attribute of the task to "Pause Scheduling".    |

#### Task List Filtering

At the top of the task list, you can filter according to the attributes of the task as needed.

| Operation Name | Operation Description                                                   |
| -------------- | ----------------------------------------------------------------------- |
| More Filters   | Click to expand more filter conditions.                                 |
| Reset Filters  | Click to reset and clear all given filter conditions.                   |
| Refresh        | Refresh and re-fetch the list according to the given filter conditions. |

#### Task Details

From the task list, click the link of the task name to enter the details page of the task. On this page, you can view basic information, upstream and downstream dependency graphs, task instances, and code.

**Basic Information**

In this area, you can view the basic information of the task. You can collapse or expand as needed.

^

**Dependency Graph**

On the dependency graph, you can view the direct upstream tasks that the current task depends on, and the direct downstream tasks that depend on it.

![](.topwrite/assets/image_1710658579364.png)

| Operation Name | Operation Description                                                                                                                  |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Search         | By giving the task name or task ID keyword, you can quickly locate the task node on the graph. The matching method used is "Contains". |
| Refresh        | Click to reload the entire dependency graph.                                                                                           |

^

**Task Instances**

In the task instance area, all task instances generated by the current task in all time ranges are displayed.

![](.topwrite/assets/image_1710658863166.png)

For a single task instance, basic control operations can be performed:

| Operation Name | Operation Description                                                                            |
| -------------- | ------------------------------------------------------------------------------------------------ |
| Stop           | For instances that are not running, you can stop them.                                           |
| Rerun          | For instances that have reached the end state, you can rerun them, i.e., run the instance again. |

**Code**

The node code area displays the latest version of the code for the current task.

![](.topwrite/assets/image_1710658900006.png)

**Task Operation**

On the task details page, you can pause, start, and delete this task. The meaning and function are the same as the operations provided in the list.

| Operation Name | Operation Description                                                                                                                                                                                      |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Pause          | Only tasks that are not in the paused state can be operated. After the operation, the scheduling attribute of the task will be set to "Pause Scheduling", i.e., no longer generate and run task instances. |
| Start          | Only tasks in the paused state can be operated. After the operation, the scheduling attribute of the task will be restored to "Normal Scheduling", i.e., generate and run task instances.                  |
| Delete         | The operation takes the task offline from the Operations Center and reverts the task to the "Unsubmitted" state of the file.                                                                               |

## Instance Operation

### Instance List

Click "Instance Operations" in the left navigation to enter the instance list page. The instance list provides a summary display of task instances in all workspaces under the currently opened service instance.

![](.topwrite/assets/image_1710658772113.png)

#### Instance List Content

In the list, you can view key attributes such as instance ID, corresponding task name, instance type, workspace, instance status, scheduled time, execution time, and completion time.

#### Instance List Filtering

At the top of the instance list, you can filter according to the attributes of the task as needed.

| Operation Name | Operation Description                                            |
| -------------- | ---------------------------------------------------------------- |
| More Filters   | Click to expand more filter conditions.                          |
| Reset Filters  | Click to reset and clear all given filter conditions.            |
| Refresh        | Refresh and re-fetch the list according to the given conditions. |

#### Instance List Operations

In the instance list, you can perform quick operations by selecting one or more task instances.

![](.topwrite/assets/image_1710658988417.png)

^

#### Single Task Instance Operation

| Operation Name | Operation Description                                                                                                                                                                                                                                                                                                                                               |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Pause          | Only task instances that are not in the paused state can be operated. After the operation, the scheduling attribute of the task instance will be set to "Pause Scheduling", i.e., no longer schedule and run the task instance.                                                                                                                                     |
| Resume         | Only task instances in the paused state can be operated. After the operation, the scheduling attribute of the task instance will be restored to "Normal Scheduling", i.e., run the task instance according to the set scheduling time.                                                                                                                              |
| Terminate      | Only running task instances can be operated. After the operation, the running task instance will be terminated and the task instance status will be set to failure.                                                                                                                                                                                                 |
| Rerun          | Only completed task instances can be operated. After the operation, the task instance will be rerun.                                                                                                                                                                                                                                                                |
| Set Success    | Only failed task instances can be operated. After the operation, the task instance will be forcibly set to success. This can be used in emergency operations scenarios. When it is judged that even if the current task instance fails, it does not affect the data correctness of the downstream task, it can unblock the running of the downstream task instance. |
| Set Failure    | Only successful task instances can be operated. After the operation, the task instance will be forcibly set to failure.                                                                                                                                                                                                                                             |

#### Batch Task Instance Operations

| Operation Name | Operation Description                                                                                 |
| -------------- | ----------------------------------------------------------------------------------------------------- |
| Pause          | Same as single operation. Note that only task instances that are not in pause status can be operated. |
| Resume         | Same as single operation. Note that only task instances that are in pause status can be operated.     |
| Terminate      | Same as single operation. Note that only running task instances can be operated.                      |
| Rerun          | Same as single operation. Note that only completed task instances can be operated.                    |
| Set Success    | Same as single operation. Note that only failed task instances can be operated.                       |
| Set Failure    | Same as single operation. Note that only successful task instances can be operated.                   |

### Instance Details

From the instance list, click on the link of the instance ID to enter the detail page of this task instance. On this page, you can view basic information, upstream and downstream dependency graphs, task instances, and code.

#### Basic Information

In this area, you can view the basic information of the task instance.

![](.topwrite/assets/image_1710659067180.png)

^

#### Dependency Graph

On the dependency graph, you can view the direct upstream task instances that the current task instance depends on, to quickly judge whether the current task instance can be scheduled normally.

![](.topwrite/assets/image_1710659193306.png)

##### Operations of Dependency Graph

| Operation Name | Operation Description                                                                                                                              |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| Search         | By giving the task name or instance ID keyword, you can quickly locate the task instance node on the graph. The matching method used is "contain". |
| Refresh        | Click to reload the entire dependency graph.                                                                                                       |

On the DAG graph, you can switch to choose to tile nodes directly or group them together, such as aggregating instance nodes with the same status into the same group.

![](.topwrite/assets/image_1710659245739.png)

#### Code

The code area will display the corresponding version of the code used by the current task instance at runtime. Please note that this is the code used when the task instance is executed, not necessarily the latest version of the task.

![](.topwrite/assets/image_1710659285422.png)

#### Execution Log

The execution log area will display all logs of the current instance execution, including logs generated after the task instance is rerun. Click on the + icon on the left side of the list to expand and view detailed content.

![](.topwrite/assets/image_1710659363263.png)

#### Operation Log

The operation log area will display the operation records of the current instance.

![](.topwrite/assets/image_1710659429272.png)

### Instance Operations&#x20;

On the task instance detail page, you can pause, resume, terminate, rerun, and set success operations for this task instance. The meaning and function are the same as the operations provided in the list.

![](.topwrite/assets/image_1710659494175.png)
