All Products
Search
Document Center

CloudOps Orchestration Service:ACS::TimerTrigger action

Last Updated:Sep 09, 2026

Purpose

Use this action for O&M scenarios that require scheduling. When an execution starts, Operation Orchestration Service (OOS) places it in the Waiting state. The execution then waits until the specified time to run the subsequent tasks. After the tasks are complete, the execution enters the Waiting state again.

Limits

Triggers have the following limits:

  • A template can have only one trigger action.

  • The task that contains the trigger action must be the first task in the Tasks section of a template.

  • Trigger actions are not allowed in nested templates (child templates).

Syntax

  • YAML format

Tasks:
  - Name: timerTask # The name of the task.
    Action: ACS::TimerTrigger
    Properties:
      Type: cron # Required. The time type. Valid values: cron, at, and rate.
      Expression: '0 * * ? * *' # Required. A cron expression, a date and time expression, or a rate expression. By default, cron expressions are based on UTC.
      TimeZone: 'Asia/Shanghai' #  Optional. The time zone. The default is UTC.
      StartDate: '2020-12-20T09:19:30Z' # Optional. The start time. The time is in UTC and must be in the YYYY-MM-DD or YYYY-MM-DDThh:mm:ssZ format. If you do not specify this parameter, the execution start time is used by default.      
      EndDate: '2020-12-29T09:19:30Z' # Required. The end time. The time is in UTC and must be in the YYYY-MM-DD or YYYY-MM-DDThh:mm:ssZ format.
  • JSON format (For details, see the comments in the YAML example)

{
  "Tasks": [
    {
      "Name": "timerTask",
      "Action": "ACS::TimerTrigger",
      "Properties": {
        "Type": "cron",
        "Expression": "0 * * ? * *",
        "StartDate": "2020-12-20T09:19:30Z",
        "EndDate": "2020-12-29T09:19:30Z",
        "TimeZone": "Asia/Shanghai"
      }
    }
  ]
}

Flowchart

The flowchart works as follows:

  • After an execution is created, the parent execution enters the Waiting state.

  • At the specified time, the parent execution enters the Running state and automatically creates a child execution that uses the same template and parameters. The child execution skips the trigger task and runs the subsequent tasks directly.

  • After the child execution completes with a status of Success, Failed, or Cancelled, the parent execution returns to the Waiting state. It then waits for the next scheduled time and repeats the process.

  • When the end time is reached, the parent execution stops waiting, completes, and is marked as Success.

  • You can cancel a parent or child execution in the same way that you cancel a normal execution. The status of a canceled execution is Cancelled.

Examples

cron type

  • YAML format:

FormatVersion: OOS-2019-06-01
Description: Schedule to reboot ECS instances.
Tasks:
  - Name: timer
    Action: ACS::TimerTrigger
    Properties:
      Type: cron
      Expression: "0 * * ? * *"
      StartDate: 2020-12-10T00:00:00Z
      EndDate: 2020-12-20T00:00:00Z
  - Name: rebootInstance
    Action: ACS::ECS::RebootInstance
    Properties:
      InstanceId: "i-xxxxx"
  • JSON format:

{
  "FormatVersion": "OOS-2019-06-01",
  "Description": "Schedule to reboot ECS instances.",
  "Tasks": [
    {
      "Name": "timer",
      "Action": "ACS::TimerTrigger",
      "Properties": {
        "Type": "cron",
        "Expression": "0 * * ? * *",
        "StartDate": "2020-12-10T00:00:00Z",
        "EndDate": "2020-12-20 00:00:00 UTC"
      }
    },
    {
      "Name": "rebootInstance",
      "Action": "ACS::ECS::RebootInstance",
      "Properties": {
        "InstanceId": "i-xxxxx"
      }
    }
  ]
}

at type

  • YAML format:

FormatVersion: OOS-2019-06-01
Description: Schedule to reboot ECS instances.
Tasks:
  - Name: timer
    Action: ACS::TimerTrigger
    Properties:
      Type: at
      Expression: '2020-02-29T09:17:35Z'
      EndDate: 2020-12-20T00:00:00Z
  - Name: rebootInstance
    Action: ACS::ECS::RebootInstance
    Properties:
      InstanceId: "i-xxxxx"
  • JSON format:

{
  "FormatVersion": "OOS-2019-06-01",
  "Description": "Schedule to reboot ECS instances.",
  "Tasks": [
    {
      "Name": "timer",
      "Action": "ACS::TimerTrigger",
      "Properties": {
        "Type": "at",
        "Expression": "2020-02-29T09:17:35Z",
        "EndDate": "2020-12-20T00:00:00.000Z"
      }
    },
    {
      "Name": "rebootInstance",
      "Action": "ACS::ECS::RebootInstance",
      "Properties": {
        "InstanceId": "i-xxxxx"
      }
    }
  ]
}