instance-scheduler-on-aws icon indicating copy to clipboard operation
instance-scheduler-on-aws copied to clipboard

Weekday use different Timezone

Open fionah821 opened this issue 5 years ago • 1 comments

I have created a stack in ap-southeast-2 region, default timezone is Australia/Melbourne. I have instances launched in us-east-2 region would like to use the aws-instance-scheduler stack launched in ap-southeast-2. I created a period scheduler-cli update-period --stack instance-scheduler-stack --name development-running-hours --weekdays mon-fri --begintime 06:00 --endtime 22:00 and a schedule scheduler-cli update-schedule --stack instance-scheduler-stack --name development-schedule --periods development-running-hours —timezone US/Central

Even though the instance is running on US/Central time 6 am to 10 pm, it is running on Australia/Melbourne's Monday to Friday. Hence, the instance did not start on US/Central's Friday at 6 am, it is equivalent to Melbourne's Saturday.

fionah821 avatar Feb 01 '21 00:02 fionah821

@fionah821 I tried to replicate the issue, used the following steps, the solution worked as per the configuration I had provided.

  • Created a stack in ap-southeast-2 with default timezone as Australia/Melbourne
  • Create a period with begin time 18:00 to end time 22:00 and weekday set to sun.
  • Create a schedule with name development-running-hours and timezone as US/Central,
  • Created an instance in us-east-2, tagged it with the schedule name development-running-hours, the instance started as expected. (local time in Melbourne was Monday 11 AM),

Can you update the environment variable Trace to True and provide us the logs for the lambda function, at the time it is expected to start the instance?

gockle avatar Feb 08 '21 00:02 gockle