All Products
Search
Document Center

Elastic Compute Service:Reduce costs with scheduled startup and shutdown

Last Updated:May 15, 2026

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.

  1. Create a file named myapp.service in the /etc/systemd/system directory 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
  2. 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.

  1. Open Task Scheduler from the Start menu.image

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

  3. Enter a task name and click Next Page.image

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

  5. Select Start a program and click Next Page.image

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

3. Create a scheduled startup and shutdown task

  1. Go to CloudOps Orchestration Service - Scheduled Startup and Shutdown.

  2. In the upper-left corner of the page, select a region and resource group.地域

  3. 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.

    image

  4. Configure Resource Types, Stop Mode, Hibernate Instance, and Permissions:

    • Resource Types: Select ECS Instance.

    • Stop Mode: Select Economical Stop Mode.

      Note

      Economical 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.

  5. Click Select Instances, select By Instance Tags, configure Region, and select an existing tag such as machine:StopAndStart.

    image

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

    image

  7. In Execution Settings(Optional), keep the defaults and click Create.

  8. In the Parameter Confirmation dialog box, verify the configurations and click OK.

    image

  9. View the execution details.

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

    image

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?