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
Test
RAM authorization
|
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.
|
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:
|
Event |
| CronType |
string |
No |
The scheduling cycle type. Valid values:
|
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
CronStr: The actual scheduling of the task flow is determined by the CronStr value.
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.
CronType: Used for validation. Set this parameter based on the cycle defined by CronStr.
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 |
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.