--- title: "Scale on a schedule" description: "Change the VM capacity of a TIR Auto Scaling Group at set UTC times, on its own or together with Usage-based scaling, and choose how long each change holds." content_type: "how-to" product: "tir-auto-scaling" platform: "TIR" url: "/tir/tir-auto-scaling/how-to/scale-on-a-schedule/" topic: ["scale"] --- # Scale on a schedule Add schedules to an Auto Scaling Group to change its capacity at times you choose, for example more VMs on weekday mornings and fewer at night. A schedule works on its own with the **Scheduled** policy, or on top of **Usage-based** scaling. For usage-based scaling, see [Scale on usage](/tir/tir-auto-scaling/how-to/scale-on-usage/). ## Before you begin - An Auto Scaling Group, or the **Create Auto Scaling Group** form open. See [Create an Auto Scaling Group](/tir/tir-auto-scaling/how-to/create-an-auto-scaling-group/). - The times you want, converted to UTC. ## Choose the policy In **Scaling**, choose the **Policy**: - **Usage-based** adds and removes VMs by usage. Schedules are optional. Each schedule sets the minimum the group works above. - **Scheduled** changes capacity only at the times you set and ignores usage. It needs at least one schedule. Each run sets the number of VMs to the schedule's count exactly, up or down. Switching to **Scheduled** adds a first, blank schedule for you. Switching back to **Usage-based** keeps only the schedules that have a time. ## Add a schedule 1. In **Schedules**, select **Add a schedule**. You can add any number of schedules, named **Schedule 1**, **Schedule 2**, and so on. 2. In **Runs at**, enter the time in cron format, "minute hour day month weekday". For example, `0 9 * * 1-5` is 9:00 on weekdays. The time is UTC. TIR spells the time out in plain words and gives the next run, so you can check it. Or pick a preset, such as **Weekdays at 9 AM**, **Daily at 12 PM**, **Daily at 8 PM** or **Monthly (1st, 12 AM)**. 3. Set the VM count in "Set the minimum to" (**Usage-based**) or "Set the VM count to" (**Scheduled**). The count is at least 1 and at most one less than **Maximum VMs**. It can be lower than the group's own minimum, so a night schedule can lower capacity. 4. In **Hold it for**, choose how long the change lasts. The default is **8 hours**. Each schedule needs a valid time of its own, and two schedules cannot share one. ## Choose how long a schedule holds **Hold it for** offers **1 hour**, **4 hours**, **8 hours**, **12 hours**, **1 day** and **Until another schedule changes it**. - With a time, the group drops back to its own minimum when the hold ends. A hold lasts at most until the schedule's next run. - With **Until another schedule changes it**, the schedule's capacity stays until a different schedule replaces it. ## How a schedule changes capacity - On a **Usage-based** group, a schedule sets the lowest number of VMs the group runs from that time. The group still adds VMs above it when usage rises. The group raises the VM count at once if it is below the schedule's count. Usage scaling handles any decrease. - On a **Scheduled** group, each run sets the number of VMs to the schedule's count exactly, up or down. It ignores usage. - When several holds are active, the highest count wins. A **Scale Now** hold counts as one more. A schedule runs only while the group is **Running**. If the group is in another state at that time, for example **Stopped**, the run is skipped for good, and **Scaling Activity** records "Scheduled change skipped". ## Edit or remove a schedule Change schedules from **Edit**. On **Edit Auto Scaling Group**, change the time, count or hold of a schedule, or remove it, then select **Update Auto Scaling Group**. Removing the last schedule of a group that had schedules deletes it when you save. A **Scheduled** group must keep at least one schedule. ## See what the schedules do The **Scaling Activity** tab has each schedule with the capacity it sets, how long it holds, and its next run in UTC. A schedule is **Enabled**, **Holding** until the time given, or **Disabled**. For a **Scheduled** group, **Overview** also gives the next change. To add VMs right now instead, see [Use Scale Now](/tir/tir-auto-scaling/how-to/use-scale-now/). For how the pieces fit, see [How auto scaling works](/tir/tir-auto-scaling/concepts/how-auto-scaling-works/).