All Products
Search
Document Center

Data Management:UpdateTaskFlowSchedule

Last Updated:Jul 31, 2026

Updates the scheduling configuration of a task flow by calling the UpdateTaskFlowSchedule operation.

Operation description

This operation updates the scheduling settings of a task flow in edit mode. You can configure timed scheduling, periodic scheduling, and event scheduling. Timed scheduling supports one-time or periodic scheduling. Event scheduling supports subscriptions to task flows and task flow nodes.
After the configuration is updated, republish and deploy the task flow. New task flow instances are then scheduled based on the updated scheduling settings.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dms:UpdateTaskFlowSchedule

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Tid

integer

No

The tenant ID.

Note

Move the pointer over the profile picture in the upper-right corner of the console to view the tenant ID. For more information, see View tenant information.

3***

DagId

integer

Yes

The task flow ID, which is the unique identifier of the task flow.

7***

ScheduleSwitch

boolean

Yes

Specifies whether to enable scheduling.

  • true

  • false

false

CronBeginDate

string

No

The start time of timed scheduling. The task flow is not scheduled before this point in time.

CronBeginDate_test

CronEndDate

string

No

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

CronEndDate_test

ScheduleParam

string

Yes

The event scheduling configuration in JSON string format.

ScheduleParam_test

CronStr

string

No

The cron expression for timed scheduling.

CronStr_test

TriggerType

string

Yes

The trigger type. Valid values:

  • Cron: timed scheduling

  • Event: event-triggered

Event

CronType

string

No

The scheduling cycle type. Valid values:

  • HOUR: hourly scheduling

  • DAY: daily scheduling

  • WEEK: weekly scheduling

  • MONTH: monthly scheduling

HOUR

TimeZoneId

string

No

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

Asia/Shanghai

Scheduling configuration metric description

Configure timed scheduling: supports periodic scheduling or one-time scheduling.

Required parameters:

  • ScheduleSwitch: True

  • TriggerType: Cron

  • CronBeginDate

  • CronEndDate

  • CronStr

  • CronType

  • ScheduleParam: varies by day, week, month, or one-time scheduling.

Examples:

Daily scheduling:

{
    "triggerType":"0",
    "dateTime":"00:00"
}

Weekly scheduling: Sunday is 1, Monday is 2, ..., Saturday is 7.

{
    "triggerType":"0",
    "dateWeek":[
        "1",
        "5"
    ],
    "weekTime":"00:00"
}

Monthly scheduling:

{
    "triggerType":"0",
    "dateMonth":"1",
    "MonthTime":"00:00"
}

One-time scheduling:

{
    "triggerType":"1",
    "specificTime":"2022-09-02 00:00"
}

Metric description

  1. CronStr: The actual scheduling of the task flow is determined by the CronStr value.

  2. CronBeginDate and CronEndDate: For periodic scheduling, CronBeginDate, CronEndDate, and CronStr together define the task flow scheduling. If the time specified by CronStr falls within the time range defined by CronBeginDate and CronEndDate, the task is triggered.

  3. CronType: Used for validation. Set this parameter based on the cycle defined by CronStr.

  4. ScheduleParam: Set this parameter based on the scheduling defined by CronStr.

Configure event scheduling (automatic cross-task-flow triggering)

Required parameters:

  • ScheduleSwitch: True

  • TriggerType: Event

  • ScheduleParam

Example:

{
    "triggerType":"2" // Set to 2 for event scheduling
    "deps":[ // Task flow and node subscription configuration
        {
            "eventType":1, // Subscription type: 0 for task flow; 1 for task node
            "lisDagId":12345, // The task flow that contains the subscribed node
            "lisNodeId":2134 // The ID of the subscribed node
        },
        {
            "eventType":0,
            "lisDagId":12343 // The ID of the subscribed task flow
        },
        {
            "eventType":0,
            "lisDagId":23456
        }
    ],
    "maxWait":21600 // The maximum wait time before all subscriptions above run successfully
}

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID, which is used to locate logs and troubleshoot issues.

7BF38A13-C181-5B5E-97F1-8643F8A10093

ErrorCode

string

The error code.

InvalidParameterValid

ErrorMessage

string

The error message returned if the call failed.

InvalidParameterValid

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.