All Products
Search
Document Center

Serverless App Engine:Create a scheduled start and stop rule

Last Updated:Apr 01, 2026

Set schedules to automatically start and stop your SAE applications. Stopped applications do not incur fees for computing resources.

For one-off batch operations (not on a schedule), see Perform batch operations on applications.

Prerequisites

Before you begin, ensure that you have:

  • A RAM user with administrative rights in the RAM console

Step 1: Grant SAE permissions to OOS

The scheduled start and stop feature runs on CloudOps Orchestration Service (OOS). This is a one-time setup: create an OOSServiceRole RAM role and grant it the AliyunSAEFullAccess permission so OOS can manage SAE on your behalf.

  1. Log on to the RAM console as a RAM user with administrative rights.

  2. In the left-side navigation pane, choose Identities > Roles.

  3. On the Roles page, click Create Role.

    image

  4. On the Create Role page, set Principal Type to Cloud Service. In the Principal Name field, search for OOS, select CloudOps Orchestration Service, and click OK.

  5. In the dialog box, enter OOSServiceRole for Role Name. On the Permissions tab, click Grant Permission. In the Policy area, search for and select AliyunSAEFullAccess, then click Grant permissions.

Step 2: Create a scheduled start and stop rule

  1. In SAE Namespaces, select a region from the drop-down list at the top of the page, then click the target Namespace to open its details page.

  2. In the left-side navigation pane, click Scheduled Start and Stop Rules. On the Scheduled Start and Stop Rules page, click Create Scheduled Start and Stop Rule.

  3. In the Create Scheduled Start and Stop Rule panel, configure the following parameters and click OK.

ParameterDescription
Rule NameA custom name for the rule.
TriggerThe action to perform on schedule: Batch Start Applications starts applications in the namespace; Batch Stop Applications stops them.
FrequencyExecute Only Once: runs once at the specified date and time. Scheduled Execution: runs on a recurring schedule defined by a cron expression.
Pre-execution Notification ConfigurationA DingTalk chatbot webhook URL. SAE sends a notification to the chatbot before each scheduled task runs, so you stay informed of upcoming operations and maintenance (O&M) actions. The custom keyword for the DingTalk chatbot must be set to SAE. For instructions, see Obtain the webhook URL of a DingTalk chatbot.
Triggered ApplicationsStart/Stop All Applications: applies to all applications in the namespace — the system scans the latest application list before each run. Start/Stop Some Applications: select specific application types and names from the drop-down list.

After the rule is created, it appears on the Scheduled Start and Stop Rules page. From there, you can Disable, Edit, or Delete existing rules.

Write a cron expression

Use cron expressions to define flexible recurring schedules. A cron expression has five space-separated fields:

FieldValue rangeNotes
Minute0–59
Hour0–230 = midnight
Day of month1–31
Month1–12 or JAN–DECThis field cannot be modified.
Day of week1–7 or Sun–Sat1 = Sunday, 7 = Saturday

Examples

ScheduleCron expression
At 22:30, Monday through Friday30 22 ? * 2,3,4,5,6
At midnight on the 5th, 15th, and 25th of each month0 0 5,15,25 * ?

Syntax rules

  • Specify a schedule by day of month or day of week — not both. Set the unused field to ? (no specific value). For example, to run on the 1st and 2nd of each month, set day of week to ?.

  • Use half-width characters only (for example, * and ?, not their full-width equivalents).

  • Separate multiple values with commas (,). For example, 3,5,7 or Tue,Thu,Sat in the day of week field triggers on Tuesday, Thursday, and Saturday.

  • Use a hyphen (-) to specify a range. For example, 2-6 in the day of week field means Monday through Friday.

[1, 7] is the value range for day of week. Entering 1,7 triggers the rule on Sunday and Saturday only — it does not specify a range.

What's next

  • To adjust an existing rule's schedule or scope, click Edit on the Scheduled Start and Stop Rules page.

  • To temporarily suspend a rule without deleting it, click Disable.