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.

RequestId String No testRequestId

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

FlowName String Yes flow

The name of the flow that is bound to the time-based schedule.

ScheduleName String Yes testScheduleName

The name of the time-based schedule. Valid values:

  • The name can contain letters, digits, underscores (_), and hyphens (-).
  • The name must start with a letter or an underscore (_).
  • The name is case-sensitive.
  • The name must be 1 to 128 characters in length.
Description String No test description

The description of the time-based schedule.

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

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

CronExpression String Yes 0 * * * * *

The cron expression.

Enable Boolean No true

Specifies whether to enable the time-based schedule. Valid values:

  • true
  • false

Response parameters

Parameter Type Example Description
RequestId String testRequestId

The ID of the request.

Description String test description

The description of the time-based schedule.

ScheduleId String testScheduleId

The ID of the time-based schedule.

Payload String {"key": "value"}

The trigger message of the time-based schedule.

ScheduleName String testScheduleName

The name of the time-based schedule.

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

The time when the time-based schedule was created.

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

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

CronExpression String 0 * * * * *

The cron expression.

Enable Boolean true

Indicates whether the time-based schedule is enabled.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateSchedule
&RequestId=testRequestId
&FlowName=flow
&ScheduleName=testScheduleName
&Description=test description
&Payload={"key": "value"}
&CronExpression=0 * * * * *
&Enable=true
&<Common request parameters>

Sample success responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

HttpCode Error code Error message Description
400 InvalidArgument Parameter error. The error message returned because the values specified for one or more request parameters are invalid. For more information, see the error message.
400 MissingRequiredHeader The HTTP header '%s' must be specified. The error message returned because a required request parameter is not specified. For more information, see the error message.
400 MissingRequiredParams The HTTP query '%s' must be specified. The error message returned because a required request parameter is not specified. For more information, see the error message.
500 InternalServerError An internal error has occurred. Please retry. The error message returned because an internal server error has occurred. Try again later.
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.
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.
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.