AWS Instance Scheduler documentation error?

0

Background:

I have been looking at the documentation for Instance Scheduler for two days now and it appears the documentation maybe incorrect.
https://docs.aws.amazon.com/solutions/latest/instance-scheduler/welcome.html
I had no issues using cloud formation to get it installed. I am using the CLI from a ec2 instance to learn how to use the scheduler. However, there appears to be an issue with the defaults that get installed.

Problem:

According to Appendix A: https://docs.aws.amazon.com/solutions/latest/instance-scheduler/appendix-a.html
The describe-schedule-usage example

$ scheduler-cli describe-schedule-usage --stack InstanceScheduler --name seattle-office-hours

Should have this output: EC2 starts at 9am and stops at 5pm.

{
   "Usage": {
      "2017-12-04": {
         "BillingHours": 8, 
         "RunningPeriods": {
            "Office-hours": {
               "Begin": "12/04/17 09:00:00", 
               "End": "12/04/17 17:00:00", 
               "BillingHours": 8, 
               "BillingSeconds": 28800
            }
         }, 
         "BillingSeconds": 28800
      }
   }, 
   "Schedule": "seattle-office-hours"

However, this is the output I get: Machine starts at 5pm and stops at Midnight

[ec2-user@ip-1.1.1.1 ~]$ scheduler-cli describe-schedule-usage --stack Ec2-RDS-InstanceScheduler --name seattle-office-hours --startdate 20200124
{
   "Usage": {
      "2020-01-24": {
         "BillingHours": 7, 
         "RunningPeriods": {
            "Office-hours": {
               "Begin": "01/24/20 17:00:00", 
               "End": "01/25/20 00:00:00", 
               "BillingHours": 7, 
               "BillingSeconds": 25200
            }
         }, 
         "BillingSeconds": 25200
      }
   }, 
   "Schedule": "seattle-office-hours"

Any help would be greatly appreciated. My assumption is this is not the correct behavior. I am trying to create a schedule that runs my bastions from say 9am - 5pm daily. But the example in the documentation is not what I am seeing.

tyop
asked 4 years ago237 views
1 Answer
0

So after hours of messing around with the Instance Scheduler I figured out that the TimeZone setting was causing the discrepancy between the documentation page and what I was seeing.

I set the default TimeZone to UTC as well as all my schedules and now I see the same results as the documentation. There must be and issue with the TimeZone setting.

[ec2-user@ip-10-102-0-92 ~]$ scheduler-cli describe-schedule-usage --stack Scheduler --name seattle-office-hours 
{
   "Usage": {
      "2020-01-27": {
         "BillingHours": 8, 
         "RunningPeriods": {
            "Office-hours": {
               "Begin": "01/27/20 09:00:00", 
               "End": "01/27/20 17:00:00", 
               "BillingHours": 8, 
               "BillingSeconds": 28800
            }
         }, 
         "BillingSeconds": 28800
      }
   }, 
   "Schedule": "seattle-office-hours"
tyop
answered 4 years ago

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.

Guidelines for Answering Questions