You can call this operation to query scheduled tasks.

Description

You can query scheduled tasks based on the scaling rule that is executed by scheduled tasks, task ID, and task name.

Debugging

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 No DescribeScheduledTasks

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

RegionId String Yes cn-qingdao

The region ID of the scaling group to which a scheduled task belongs.

PageNumber Integer No 1

The page number of the scheduled task list to return. Pages start from page 1.

Default value: 1

PageSize Integer No 50

The number of entries to return on each page. Maximum value: 50.

Default value: 10

ScheduledAction.1 String No ari:acs:ess:cn-qingdao:1344371:scalingrule/cCBpdYdQuBe2cUxOdu6****

The operation to be performed when scheduled task N is triggered. Valid values of N: 1 to 20.

ScheduledTaskId.1 String No edRtShc57WGXdt8TlPbr****

The ID of scheduled task N to be queried. Valid values of N: 1 to 20.

ScheduledTaskName.1 String No edRtShc57WGXdt8TlPbr****

The name of scheduled task N to be queried. Valid values of N: 1 to 20.

Response parameters

Parameter Type Example Description
PageNumber Integer 1

The page number of the returned page.

PageSize Integer 50

The number of entries returned per page.

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

ScheduledTasks Array

The collection of scheduled tasks.

ScheduledTask
Description String fortest

The description of the scheduled task.

DesiredCapacity Integer 10

The expected number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group.

LaunchExpirationTime Integer 600

The time period during which the failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600.

LaunchTime String 2014-08-18T10:52Z

The time when the scheduled task was triggered.

MaxValue Integer 10

The maximum number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group.

MinValue Integer 0

The minimum number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group.

RecurrenceEndTime String 2014-08-20T16:55Z

The end time after which the scheduled task is no longer repeated.

RecurrenceType String Daily

The interval that a scheduled task is repeated at.

RecurrenceValue String 1

The recurrence value of the scheduled task to be repeated.

ScalingGroupId String asg-****

The ID of the scaling group where the number of instances is modified when the scheduled task is triggered. You can modify the number of instances by specifying the following parameters: MinValue, MaxValue, and DesiredCapacity.

Note: You cannot specify ScheduledAction and ScalingGroupId at the same time.

ScheduledAction String ari:acs:ess:cn-qingdao:1344371:scalingrule/cCBpdYdQuBe2cUxOdu6****

The scaling rule that is executed when the scheduled task is triggered.

Note: You cannot specify ScheduledAction and ScalingGroupId at the same time.

ScheduledTaskId String edRtShc57WGXdt8TlPbr****

The ID of the scheduled task.

ScheduledTaskName String edRtShc57WGXdt8TlPbr****

The name of the scheduled task.

TaskEnabled Boolean true

Indicates whether the scheduled task is enabled.

TotalCount Integer 1

The total number of scheduled tasks.

Examples

Sample requests

http://ess.aliyuncs.com/?Action=DescribeScheduledTasks
&RegionId=cn-qingdao
&ScheduledTaskId.1=edRtShc57WGXdt8TlPbr****
&PageSize=50
&<Common request parameters>

Sample success responses

XML format

<DescribeScheduledTasksResponse>
      <ScheduledTasks>
            <ScheduledTask>
                  <LaunchExpirationTime>600</LaunchExpirationTime>
                  <RecurrenceType>Daily</RecurrenceType>
                  <RecurrenceEndTime>2020-03-02T00:00Z</RecurrenceEndTime>
                  <ScalingGroupId>asg-****</ScalingGroupId>
                  <TaskEnabled>false</TaskEnabled>
                  <ScheduledTaskName>demo1</ScheduledTaskName>
                  <MaxValue>1</MaxValue>
                  <LaunchTime>2020-03-01T00:00Z</LaunchTime>
                  <ScheduledTaskId>cV0bJbAXpipdbFI1NbM****</ScheduledTaskId>
                  <RecurrenceValue>31</RecurrenceValue>
            </ScheduledTask>
            <ScheduledTask>
                  <LaunchExpirationTime>600</LaunchExpirationTime>
                  <MinValue>1</MinValue>
                  <RecurrenceType>Daily</RecurrenceType>
                  <RecurrenceEndTime>2020-02-27T00:00Z</RecurrenceEndTime>
                  <ScalingGroupId>asg-****</ScalingGroupId>
                  <TaskEnabled>true</TaskEnabled>
                  <ScheduledTaskName>demo2</ScheduledTaskName>
                  <LaunchTime>2020-02-26T00:00Z</LaunchTime>
                  <ScheduledTaskId>cD3G3pesE65NcSTmkld1****</ScheduledTaskId>
                  <RecurrenceValue>31</RecurrenceValue>
            </ScheduledTask>
      </ScheduledTasks>
      <PageNumber>1</PageNumber>
      <TotalCount>34</TotalCount>
      <PageSize>10</PageSize>
      <RequestId>4CF33369-7318-4BD5-BE1C-A776BA2C6627</RequestId>
</DescribeScheduledTasksResponse>

JSON format

{
	"ScheduledTasks": {
		"ScheduledTask": [
			{
				"LaunchExpirationTime": 600,
				"RecurrenceType": "Daily",
				"RecurrenceEndTime": "2020-03-02T00:00Z",
				"ScalingGroupId": "asg-****",
				"TaskEnabled": false,
				"ScheduledTaskName": "demo1",
				"MaxValue": 1,
				"LaunchTime": "2020-03-01T00:00Z",
				"ScheduledTaskId": "cV0bJbAXpipdbFI1NbM****",
				"RecurrenceValue": "31"
			},
			{
				"LaunchExpirationTime": 600,
				"MinValue": 1,
				"RecurrenceType": "Daily",
				"RecurrenceEndTime": "2020-02-27T00:00Z",
				"ScalingGroupId": "asg-****",
				"TaskEnabled": true,
				"ScheduledTaskName": "demo2",
				"LaunchTime": "2020-02-26T00:00Z",
				"ScheduledTaskId": "cD3G3pesE65NcSTmkld1****",
				"RecurrenceValue": "31"
			}
		]
	},
	"PageNumber": 1,
	"TotalCount": 34,
	"PageSize": 10,
	"RequestId": "4CF33369-7318-4BD5-BE1C-A776BA2C6627"
}

Error codes

For a list of error codes, visit the API Error Center.