A scheduled node is a preset node. You can invoke the CreateScheduledTask API to create a scheduled node that executes a specified scaling rule at a specified time. This enables automatic scaling of compute resources to meet business requirements while controlling costs.
Operation description
-
If a scheduled node trigger to execute a scaling rule has failed because a scaling activity is in progress or the scaling group is disabled, the scheduled node automatically retries the trigger within the
LaunchExpirationTimeperiod. Otherwise, the scheduled trigger is canceled. -
If multiple scheduled nodes trigger scaling rules for the same scaling group at approximately the same time, the details of the triggered scaling activities are as follows:
Scaling groups with Settings for the expected number of instances: Scaling activities triggered by multiple scheduled nodes are classified as parallel scaling activity. For example, if multiple scheduled nodes are executed at approximately the same time, the scaling group can trigger multiple parallel scaling activity events simultaneously.
Scaling groups without Settings for the expected number of instances: The earliest triggered scheduled node executes the scaling activity first. Because a scaling group can have only one scaling activity at a time, subsequent scheduled nodes automatically retry the scheduled trigger within the
LaunchExpirationTimeperiod. If a subsequent scheduled node is still retrying within theLaunchExpirationTimeperiod after the previous scaling activity is completed, the scaling rule of the scheduled node is executed to trigger the corresponding scaling activity.
-
Scheduled nodes support the following two scaling methods:
Use the ScheduledAction parameter to specify the scaling rule to be executed.
Use the ScalingGroupId parameter to specify the number of instances in the scaling group.
NoteYou cannot specify both ScheduledAction and ScalingGroupId at the same time.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:CreateScheduledTask |
create |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region to which the scheduled task belongs. |
cn-qingdao |
| ScheduledTaskName |
string |
No |
The name of the scheduled task. The name must be 2 to 64 characters in length. It must start with a letter, digit, or Chinese character, and can contain letters, digits, Chinese characters, underscores (_), hyphens (-), and periods (.). The name must be unique within the same region and account. Default value: the value of ScheduledTaskId. |
scheduled**** |
| Description |
string |
No |
The description of the scheduled task. The description must be 2 to 200 characters in length. |
Test scheduled task. |
| ScheduledAction |
string |
No |
The unique identifier of the scaling rule to be executed when the scheduled task is triggered. After you specify |
ari:acs:ess:cn-hangzhou:140692647****:scalingrule/asr-bp12tcnol686y1ik**** |
| RecurrenceEndTime |
string |
No |
The end time of the scheduled task that is executed repeatedly. Specify the time in the ISO 8601 standard in the UTC time format. Format: YYYY-MM-DDThh:mmZ. You cannot specify a time that is later than 365 days from the creation date. |
2014-08-17T16:55Z |
| LaunchTime |
string |
No |
The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the UTC time format. Format: YYYY-MM-DDThh:mmZ. You cannot specify a time that is later than 90 days from the creation date.
|
2014-08-17T16:52Z |
| RecurrenceType |
string |
No |
The recurrence type of the scheduled task. Valid values:
You must specify both |
Daily |
| RecurrenceValue |
string |
No |
The recurrence value of the scheduled task.
You must specify both |
1 |
| TaskEnabled |
boolean |
No |
Specifies whether to start the scheduled task. Valid values:
Default value: true. |
true |
| LaunchExpirationTime |
integer |
No |
The period during which the scheduled task retries the trigger after the trigger operation fails. Unit: seconds. Valid values: 0 to 1800. Default value: 600. |
600 |
| MinValue |
integer |
No |
The minimum number of instances in the scaling group when the scaling method of the scheduled task is to specify the number of instances in the scaling group. |
0 |
| MaxValue |
integer |
No |
The maximum number of instances in the scaling group when the scaling method of the scheduled task is to specify the number of instances in the scaling group. |
10 |
| DesiredCapacity |
integer |
No |
The expected number of instances in the scaling group when the scaling method of the scheduled task is to specify the number of instances in the scaling group. Note
The scaling group must support the expected number of instances. This means that |
10 |
| ScalingGroupId |
string |
No |
The ID of the scaling group for which you want to modify the number of instances when the scheduled task is triggered. After you specify |
asg-bp18p2yfxow2dloq**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| ScheduledTaskId |
string |
The ID of the scheduled task. The ID is generated by the system and is globally unique. |
edRtShc57WGXdt8TlPbr**** |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"ScheduledTaskId": "edRtShc57WGXdt8TlPbr****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.