Comments (6)
@CrypticCabub I suspect I know what @HaaLeo wants, because I want the same thing, and I guess it is really a duplicate of #233
Currently I work on a project with a single Aurora cluster that services dev teams across Australia (spanning multiple timezones, with and without daylight saving). I would like to be able to shut this DB down outside working hours since it is only needed for dev environments.
Ideally, I would like to create a single schedule that specifies multiple periods in different timezones like so:
# Excerpt from schedules IaC stack
Resources:
AustralianSchedule:
Type: 'Custom::ServiceInstanceSchedule'
Properties:
ServiceToken: !Ref ServiceInstanceScheduleServiceTokenARN
Name: australian-business-hours
Description: Cover core business hours in Australia across AWST and AEST/AEDT
Timezone: Australia/Melbourne
Periods:
- Description: "8:30-5:30, mon-fri Melbourne time"
# This one uses the schedule's default timezone of Australia/Melbourne time
# i.e. AEST/AEDT depending on daylight saving.
BeginTime: "08:30"
EndTime: '17:30'
WeekDays: 'Mon-Fri'
- Description: "8:30-5:30, mon-fri Perth time"
Timezone: Australia/Perth
BeginTime: "08:30"
EndTime: '17:30'
WeekDays: 'Mon-Fri'
Obviously the same thing could be achieved by just specifying a single period that encompasses both the timezones, but that is less clear, more error prone and weird with daylight savings if the timezones treat it differently.
from instance-scheduler-on-aws.
Thanks for the clarification. I believe I've seen a similar FR before for timezone-aware periods. To say it back -- the ask is for Instance Scheduler to provide a way to specify timezones on a per-period level and allow a schedule to contain multiple of these timezone-aware periods.
I'll re-open this FR and bring it up with the team for further discussion
from instance-scheduler-on-aws.
Hi @HaaLeo
If I am understanding your use case correctly, Instance Scheduler should already support what you are describing.
Under the current design of Instance Scheduler, periods are timezone-agnostic and can be shared by multiple schedules. Timezones can then be defined at the schedule level with a default timezone for the entire deployment that will be used if one is not specified on the schedule itself.
To achieve the behavior you describe, you would create a period for your developer hours of 7am-6pm, and then you would create 2 schedules (developer-hours-germany and developer-hours-us). These schedules would both use the developer-hours period but would define different timezones. You can then tag your instances with whichever schedule corresponds to the timezone that they should operate under
from instance-scheduler-on-aws.
Hi @CrypticCabub thx for your response. I meant it slightly different. We use a single instance for both teams. Therefore, we want either one instance Support multiple schedules or better one schedule to support multiple timezones.
I hope that makes it somewhat clear 😅.
from instance-scheduler-on-aws.
A single instance as in a shared EC2 instance that both teams use or a single deployment of Instance Scheduler?
If the latter, Instance Scheduler allows timezones to be defined per-schedule. The stack defines a default timezone that will be used if a schedule does not provide its own specific timezone within which it should operate. Refer to the "london-working-hours" schedule as an example in our Implementation Guide:
https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/sample-schedule.html
As for 1 schedule supporting multiple timezones, I'm not sure I understand how such a thing would be possible. How would we determine the correct state for an instance?
Suppose a schedule with a period of 14:00-16:00, and 2 timezones: UTC+5, and UTC-5. at 10:00 UTC what state is the schedule in? For one timezone it is 5:00 and for the other it is 15:00. Which time do we use to determine whether we are in our running period of 14:00-16:00?
What about a schedule with multiple periods that all define different instance_types for resizing?
The "correct" way under our current design is that each schedule defines exactly 1 timezone within which it operates (or if no timezone is provided, will fallback to the default timezone). If we need to define office hours as 9am-5pm in local time, we do so with a period, and then we can add that period to as many different schedules as we like with each schedule providing the timezone that is necessary to convert a local time into a schedulable time.
from instance-scheduler-on-aws.
@frogamic thx for stepping in. That's essentially what I've meant 😅. Thx for reopening @CrypticCabub 🙏🏼.
from instance-scheduler-on-aws.
Related Issues (20)
- Holiday shutdown HOT 1
- DynamoDB State DB miss reporting correct state of EC2 Instance HOT 5
- Provide a way to specify weekdays after an nth weekday HOT 1
- Skip the stopping of an instance when 'in use' HOT 1
- Invalid PhysicalResourceId and Received response status [FAILED] from custom resource HOT 5
- maximum accounts HOT 1
- ASG support HOT 3
- remote template URL not accessible when used in StackSet HOT 2
- override_status - replacement HOT 4
- Is there a way to have Instance Scheduler support a cron-like syntax to build dynamic schedules in the future HOT 8
- Organisation mode and exclude account HOT 3
- Feature Request - To support multiple one sided starts in a day HOT 1
- Test with Tow accounts in organization mode HOT 2
- General questions regarding version 1.5.6 HOT 1
- Namespace is required for spoke deployments HOT 1
- ASGHandler - ClientError (ValidationError) when using a high number of configured schedules HOT 2
- General questions regarding version 3.0.0 HOT 6
- ASGHandler - ClientError (AccessDenied) when AssumeRole HOT 2
- ASGHandler - High Memory needs (Runtime.ExitError) HOT 7
- Error in logs after enabling maintenance windows in v3.0.0 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instance-scheduler-on-aws.