Updates the scheduling configurations of a task flow.

You can call this operation to update the scheduling configurations of a task flow in the editing state. You can configure timed scheduling, recurring scheduling, and event scheduling. Timed scheduling allows you to configure one-time or periodic scheduling. Event scheduling allows you to configure subscriptions to task flows and task flow nodes.

After the configuration is updated, the task flow is republished and deployed. New task flow instances are scheduled based on the new scheduling settings.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateTaskFlowSchedule

The operation that you want to perform. Set the value to UpdateTaskFlowSchedule.

Tid Long No 3***

The ID of the tenant.

Note The ID of the tenant is displayed when you move the pointer over the profile picture in the upper-right corner of the Data Management (DMS) console. For more information, see the "View information about the current tenant" section of the Manage DMS tenants topic.
DagId Long Yes 7***

The ID of the task flow.

ScheduleSwitch Boolean Yes Disable

Specifies whether to enable scheduling.

  • Enable
  • Disable
CronBeginDate String No CronBeginDate_test

The task flow is not scheduled before this point in time.

CronEndDate String No CronEndDate_test

The end time of the timed scheduling. The task flow is not scheduled after this point in time.

ScheduleParam String Yes ScheduleParam_test

The event scheduling configuration. This parameter is a JSON string.

CronStr String No CronStr_test

Timed scheduling: Cron.

TriggerType String Yes Event

The mode in which the task flow is triggered. Valid values:

  • Cron: timed scheduling
  • Event: triggered by event
CronType String No HOUR

The type of the scheduling cycle. Valid values:

  • MINUTE: schedule by minute
  • HOUR: schedule by hour
  • DAY: schedule by day
  • WEEK: schedule by week
  • MONTH: schedule by month
TimeZoneId String No Asia/Shanghai

The time zone. Default value: UTC+8 (Asia/Shanghai).

Scheduling parameters

Timed scheduling: You can configure this parameter to one-time or periodic scheduling.

The following parameters are required:

  • ScheduleSwitch: True
  • TriggerType: Cron
  • CronBeginDate
  • CronEndDate
  • CronStr
  • CronType
  • ScheduleParam: The scheduling is performed once or by day, week, or month.


Scheduling by day:

Scheduling by week: "1" for Sunday, "2" for Monday, …"7" for Saturday.

Scheduling by month:
One-time scheduling:
    "specificTime":"2022-09-02 00:00"

1. CronStr: The scheduling of the task flow is based on the value of CronStr.

2. CronBeginDate and CronEndDate: During periodic scheduling, CronBeginDate, CronEndDate, and CronStr define the task flow scheduling. If the time point specified by CronStr is within the range of CronBeginDate and CronEndDate, the task is triggered.

3. CronType: It is used for verification. You must configure this parameter based on the cycle defined by CronStr.

4. ScheduleParam: You must configure this parameter based on the scheduling type specified by CronStr.

Event scheduling (automatically triggered across task flows)

The following parameters are required:

  • ScheduleSwitch: True
  • TriggerType: Event
  • ScheduleParam


    "triggerType":"2" // Set the value to 2 for event scheduling.
    "deps":[ // Configure the subscription to task flows/nodes.
            "eventType":1, // Subscription type: "0" for task flow and "1" for task node.
            "lisDagId":12345, // The task flow where the subscribed node resides.
            "lisNodeId":2134 // The ID of the subscribed node.
            "lisDagId":12343 // The ID of the subscribed task flow.
    "maxWait":21600 // The longest amount of time to wait for the preceding subscriptions to complete.

Response parameters

Parameter Type Example Description
RequestId String 7BF38A13-C181-5B5E-97F1-8643F8A10093

The ID of the request. You can use the ID to locate logs and troubleshoot issues.

ErrorCode String InvalidParameterValid

The error code returned if the request failed.

ErrorMessage String InvalidParameterValid

The error message returned if the request failed.

Success Boolean true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.


Sample requests

&Common request parameters

Sample responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "7BF38A13-C181-5B5E-97F1-8643F8A10093",
  "ErrorCode" : "InvalidParameterValid",
  "ErrorMessage" : "InvalidParameterValid",
  "Success" : true

Error codes

For a list of error codes, see Service error codes.