Skip to content

adding a schedule to your auto scaling group to run Monday-Friday, 8am to 5pm

0

hi Guys, So, I was tasked with adding a schedule to the auto scaling group to run Monday-Friday, 8am to 5pm only. So my schedule look like this:screenshot of the schedule

Apparently, the schedule is not working as it should and I can't find what is wrong. Can anyone identify what is wrong with this configuration. So the EC2 should only run between hours of 8am to 5pm MON-FRI.

Thank you.

  • Could you expand on "not working as it should" - is there an error message? Is it running at the wrong times?

2 Answers
2

The schedule as shown in the screenshot would ensure that the min, max and desired is 1 whenever the scheduled action is run but does not mean it's set to 0 for the non-scheduled time. If you want the EC2 instance to run only between 8-5 on weekdays, you need to schedule two jobs One to run at 8 am with the min, max and desired to 1 (cron - 0 8 * * 1-5). Another one at 5 pm with min, max and desired to 0 (cron - 0 17 * * 1-5)

Since min & max are 1 you don't need to run it hourly

answered 3 years ago
0

Thank you for the answer, makes sense, just thought you could do it with one schedule but I'm still learning. Now, when I went to create the shutdown schedule, it complains of the following: Provide at least one value for Desired, Min, or Max Capacity Do you know why? Enter image description here Thanks again.

answered 3 years ago
  • That's an info bubble that's always there (you can see it in your first screenshot as well). It should allow you to create the scheduled action as-is. One thing though, "Start Time" is the "next time" the action will invoke. So as is it'll trigger at midnight the first time (every time it runs, it adjusts the 'start time' to be the next occurrence of the Cron). So you want to make sure the "Star Time" value matches with your Cron schedule

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.