Pause and resume task instances
You can use natural language commands to instruct code agents such as Qoder and CodeX to locate Dataphin scheduled task instances by task name, business date, and run time, and to pause or resume their scheduling. This document describes the functions, prerequisites, usage examples, and execution results of this feature, and provides a list of input information in the appendix for reference.
Features
This feature lets you use natural language to pause or resume the scheduling of Dataphin task instances. Common operations include locating an instance by its task name, business date, and run time; preventing an instance from running at its scheduled time, and resuming a paused instance.
Use cases:
-
Temporarily pause an hourly task instance for a specific run time and resume it later when the data is ready.
-
Temporarily pause an instance that is waiting for scheduling to avoid resource consumption or accidental triggering.
-
Resume a previously paused instance to return it to the normal "Waiting for Scheduling" state.
-
Check if an instance is paused.
Limitations: After a successful pause, the instance status might still be displayed as "Waiting for Scheduling". The scheduling pause flag is the definitive indicator of its state. Resuming an instance only returns it to the "Waiting for Scheduling" state. The scheduler will automatically trigger the instance at its scheduled time; it does not run immediately. If you need to execute the task immediately, use the rerun feature instead. If multiple instances are matched, you must confirm a single target, as the agent will not pause or resume all of them.
Prerequisites
-
You must know the target tenant ID and project ID.
-
You must know the target task name and business date. The default is T-1 (yesterday).
-
For hourly tasks, you must specify the target run time.
Usage examples
You can describe your needs to the agent directly in natural language. Here are a few examples:
-
Pause yesterday's instance of a task to prevent it from running at its scheduled time.
-
For an hourly task, pause the instance scheduled for the 20:45 run time.
-
Resume a paused instance.
-
Check if an instance is paused.
Interaction steps:
-
The agent first confirms the target project, task name, business date (default is T-1, yesterday), environment (Development or Production), and operation type (Pause or Resume).
-
The agent locates the instance based on the task name and business date. For an hourly task with multiple instances on the same business date, you must select a single target by its run time.
-
If multiple instances are matched, the agent lists them and prompts you to select one. The agent will not modify all matched instances.
-
Before executing the pause or resume operation, the agent confirms details such as the instance, task name, project, environment, business date, and run time.
-
After the operation, the agent queries the instance details to confirm the result by checking the scheduling pause flag. The flag is set to true after a pause and false after a resume.
Execution results
The results of the operation include the following:
-
Response Content: The pause and resume operations return a confirmation of whether the command was successfully sent. A query for instance details returns the instance status, scheduling pause flag, run time, and business date.
-
Completion Status: A pause is successful if the scheduling pause flag is true, and a resume is successful if the flag is false. After you resume an instance, its status might still appear as "Waiting for Scheduling". This is expected behavior, and the task will run automatically at its scheduled time.
-
Verification: To verify the operation, query the instance details and check the scheduling pause flag. If the flag has not changed, it usually indicates a mismatch between the specified project or environment and the actual instance.
A successful command-line response only means that your request has been accepted. For the definitive result, always refer to the status displayed in the Dataphin user interface.
Appendix: Input information
The following table lists information items that may be required to pause or resume a task instance. This is for reference only. In practice, the agent automatically identifies the required information from your request and prompts you if any information is missing. You do not need to provide items that are handled automatically by the system.
|
Parameter |
Required |
Description |
Example |
|
Tenant ID |
Conditional |
Can be omitted if specified in your credential configuration. |
1234567890123456789 |
|
Project ID |
Yes |
The project to which the instance belongs. |
— |
|
Environment |
No |
The execution environment. Options are Development or Production. The default is Production. |
Production |
|
Task name |
Yes |
The name of the task to pause or resume. |
— |
|
Business date |
No |
The business date of the instance. The default is T-1 (yesterday). |
20260907 |
|
Run time |
No |
Specifies the target instance for an hourly task when multiple instances exist on the same business date. |
20:45 |
|
Operation type |
Yes |
Pause or Resume. |
Pause |