Schedule ECS instances to stop in economical mode during off-peak hours with CloudOps Orchestration Service (OOS) to cut idle compute costs.
Background
When you stop an ECS instance in Economical Mode, these resources are released and no longer billed:
-
vCPUs (GPUs or FPGAs for heterogeneous computing instances)
-
Memory
-
Static public IP addresses (automatically assigned to the instance)
-
Image licenses
Other resources, such as cloud disks, EIPs, and snapshots, are retained and still billed. See Economical mode.
Prerequisites
The ECS instances are pay-as-you-go or spot instances.
Procedure
1. Add tags to instances
Tag ECS instances that need scheduled startup and shutdown so you can select them by tag in CloudOps Orchestration Service tasks. For example, add the machine:StopAndStart tag. See Tags.
2. Configure services to auto-start on instance startup
Configure internal services to start automatically when the instance boots.
Linux instance
This example uses systemd to configure a service named myapp to auto-start on boot.
-
Create a file named
myapp.servicein the/etc/systemd/systemdirectory with the following content:# System unit configuration [Unit] # Service description Description=My Application Service # Service configuration [Service] # Startup script path. Customize the startup script based on the service. ExecStart=/path/to/myapp/start.sh # Always restart the service Restart=always # Installation configuration [Install] # Configure the startup target. WantedBy=multi-user.target -
Enable auto-start and start the service:
#Enable automatic startup sudo systemctl enable myapp.service #Start the service sudo systemctl start myapp.service
Windows instance
This example uses Task Scheduler on a Windows Server 2025 instance to configure a program to auto-start on boot.
-
Open Task Scheduler from the Start menu.

-
In the top navigation bar, choose Actions > Create Basic Task.

-
Enter a task name and click Next Page.

-
Select When the computer starts as the trigger and click Next Page.

-
Select Start a program and click Next Page.

-
Upload a program or script, click Next Page, and then click Completed.

3. Create a scheduled startup and shutdown task
-
Go to CloudOps Orchestration Service - Scheduled Startup and Shutdown.
In the upper-left corner of the page, select a region and resource group.
-
Click Create. In Select Task Type, configure Task Name, Execution Cycle, Task Type, Time Zone, Shutdown Time, Startup Time, and End Time.
For example, set Startup Time to 08:00:00 and Shutdown Time to 21:00:00 to start instances at 08:00 and stop them at 21:00 daily. Preview the schedule in Execution Time Preview.

-
Configure Resource Types, Stop Mode, Hibernate Instance, and Permissions:
-
Resource Types: Select ECS Instance.
-
Stop Mode: Select Economical Stop Mode.
NoteEconomical mode stops billing for computing resources (vCPUs and memory), static public IP addresses, and image licenses. Instance data and configurations are retained. You are still charged for system disks, data disks, EIPs, and snapshots. See Economical mode.
-
Hibernate Instance: Leave this switch off.
-
Permissions: Select Default Service-linked Role.
-
-
Click Select Instances, select By Instance Tags, configure Region, and select an existing tag such as machine:StopAndStart.

-
Click Advanced (Optional). Set Rate control type to Concurrency-based Control, and configure Concurrency and Error Threshold.

-
In Execution Settings(Optional), keep the defaults and click Create.
-
In the Parameter Confirmation dialog box, verify the configurations and click OK.

-
View the execution details.
On the Scheduled Startup/Shutdown page, find the task and click Details in the Actions column.

References
CloudOps Orchestration Service is a free Alibaba Cloud O&M service for automating repetitive, event-driven, scheduled, and cross-region tasks. OOS supports batch processing, approval workflows, and Operations as Code through reusable templates. See What is CloudOps Orchestration Service?