How to schedule Start/Stop/Reboot of EC2 Instance

Follow these steps to schedule Start, Stop, or Reboot EC2 Instance:

Go to the EC2 section by selecting EC2 from Main Menu.

To open the scheduler wizard for a given EC2 instance, from the menu select Schedule Start/Stop/Reboot.

From the Action drop down list, select the schedule action (Start, Stop or Reboot).

Next, set a schedule for the action to occur:

Hourly – The action is executed each set number of hours. Additionally, you can specify start and end time, e.g. to reboot Instance every 2 hours between 8AM and 7PM, here is how the setup looks:

If you skip the start and end time, the instance reboots each set number of hours around the clock.

Daily – The action is executed each set day at the set time, e.g. to start Instance every weekday at 8AM, here is how the setup looks:

Monthly – The action is executed every set day of the month at the set time, e.g. to reboot Instance every 3^rd^ day of the month at 8AM, here is how the setup looks:

Stop Condition

You may want to prevent Stop Instance when activity on the EC2 remains ongoing. To accomplish this, use the Stop Condition to specify when the stop action should not be executed. Specifications can be set based on the CPU or Network usage, e.g. specify prevent Stop Instance when the CPU usage is above a set threshold:

When the stop condition is specified, the system will check the given EC2 CloudWatch metric before Stop Instance occurs; if the value is greater than the threshold, the action will not execute.

To use the stop condition, EC2 must have Detail Monitoring turned on. If Detail Monitoring is not enabled, CloudWatch may return information that is delayed 15 minutes, and inaccurately report current usage condition.

Turn on Detail Monitoring directly from the AWS Management Console, or click the Enable Detail Monitoring link. If the link is not visible onscreen, Detail Monitoring is already turned on for the given EC2 instance.

Extend Operation Hours

You may need to temporarily change the schedule (e.g. stop the Instance two hours later). Instead of changing the entire schedule, the EC2 Instance operation can be extended by adding or subtracting hours.

Select to apply new hours to today’s or tomorrow’s schedule and whether new hours should be applied to the Start or Stop action, e.g. to extend operation of the current day's EC2 Instance for an additional 2 hours, select Today and Stop and click the +1h button twice. You will see “Today: Stop +2” under Extended Hours.

Suspend/Resume Schedule

At any time, you can suspend or resume a previously suspended schedule: from the list of schedules, click Suspend or Resume. When Suspend is clicked, the scheduled action is suspended until you resume it. Please remember: if you suspend scheduled action for 6PM execution and you resume at 7PM the same day, it will not execute until next day at 6PM.

By repeating the above steps, you can setup multiple schedulers for the same EC2 Instance using different actions. For example, to Start Instance every weekday at 8AM and stop it at 6PM, following is how the setup looks:

To schedule the same action for multiple EC2 Instances, please use Scheduler Templates.

To learn more about templates please read Introduction to Scheduler Templates