Creates a time-based schedule.

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 Yes CreateSchedule

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

CronExpression String Yes 0 * * * * *

The CRON expression of the time-based schedule to be created.

FlowName String Yes testFlowName

The name of the flow bound to the time-based schedule you want to create.

ScheduleName String Yes testScheduleName

The name of the time-based schedule to be created.

RequestId String No testRequestId

The ID of the request. If you do not specify this parameter, the system generates a random value.

Description String No test description

The description of the time-based schedule to be created.

Payload String No {"key": "value"}

The trigger message of the time-based schedule to be created. It must be in JSON format.

Enable Boolean No true

Specifies whether to enable the time-based schedule you want to create.

Response parameters

Parameter Type Example Description
CreatedTime String 2020-01-01T01:01:01.001Z

The time when the time-based schedule was created.

CronExpression String 0 * * * * *

The CRON expression of the time-based schedule.

Description String test description

The description of the time-based schedule.

Enable Boolean true

Indicates whether to enable the time-based schedule.

LastModifiedTime String 2020-01-01T01:01:01.001Z

The time when the time-based schedule was last updated.

Payload String {"key": "value"}

The trigger message of the time-based schedule.

RequestId String testRequestId

The ID of the request.

ScheduleId String testScheduleId

The ID of the time-based schedule.

ScheduleName String testScheduleName

The name of the time-based schedule.

Examples

Sample requests

http(s)://[Endpoint]/? Action=CreateSchedule
&CronExpression=0 * * * * *
&FlowName=testFlowName
&ScheduleName=testScheduleName
&<Common request parameters>

Sample success responses

XML format

<CreateScheduleResponse>
    <Description>Response in XML format is not supported. </Description>
</CreateScheduleResponse>

JSON format

{
  "Description":"test description",
  "CreatedTime":"2020-01-01T01:01:01.001Z",
  "RequestId":"testRequestId",
  "LastModifiedTime":"2020-01-01T01:01:01.001Z",
  "Enable":"true",
  "Payload":"{\"key\": \"value\"}",
  "CronExpression":"0 * * * * *",
  "ScheduleId":"testScheduleId",
  "ScheduleName":"testScheduleName"
}

Error codes

HttpCode Error code Error message Description
403 AccessDenied The resources doesn't belong to you. The error message returned because request authentication failed. For more information, see the actual error message.
400 APIVersionNotSupported The requested API version '%s' is not supported yet. Please check. The error message returned because the requested API version is wrong. For more information, see Make API requests.
409 ConcurrentUpdateError Update conflict, please retry. The error message returned because concurrent write operations are performed on the requested resource. Wait for a while and then try again.
404 FlowNotExists Flow %s does not exist. The error message returned because the requested resource does not exist. Ensure that the flow has been created.
500 InternalServerError An internal error has occurred. Please retry. The error message returned because an internal server error has occurred. Try again later.
400 InvalidArgument Parameter error. The error message returned because the request parameters are invalid. For more information, see the actual error message.
400 MissingRequiredHeader The HTTP header '%s' must be specified. The error message returned because the required request parameters are missing. For more information, see the actual error message.
400 MissingRequiredParams The HTTP query '%s' must be specified. The error message returned because the required request parameters are missing. For more information, see the actual error message.
409 ScheduleAlreadyExists The schedule %s already exists in flow %s. The error message returned because the time-based schedule already exists.

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