instance-scheduler-on-aws
instance-scheduler-on-aws copied to clipboard
Two periods defined in schedule, only one period is working
I have the following periods defined:
{
"Periods": [
{
"Begintime": "10:00",
"Description": "period-1",
"Endtime": "23:59",
"Name": "period1",
"Type": "period"
}
]
}
{
"Periods": [
{
"Begintime": "00:00",
"Description": "period-2",
"Endtime": "03:00",
"Name": "period2",
"Type": "period"
}
]
}
and the schedule:
{
"Schedules": [
{
"UseMaintenanceWindow": false,
"StopNewInstances": true,
"UseMetrics": false,
"Timezone": "Asia/Manila",
"Hibernate": false,
"Enforced": false,
"RetainRunning": false,
"Description": "Test schedule, delete after use",
"Periods": [
"period1",
"period2"
],
"Name": "testing",
"Type": "schedule"
}
]
}
but when I simulate the usage, it gives me this:
{
"Schedule": "testing",
"Usage": {
"2020-07-16": {
"RunningPeriods": {
"Period1": {
"Begin": "07/16/20 03:00:00",
"End": "07/16/20 23:59:00",
"BillingHours": 21,
"BillingSeconds": 75540
}
},
"BillingSeconds": 75540,
"BillingHours": 21
},
"2020-07-17": {
"RunningPeriods": {
"Period1": {
"Begin": "07/17/20 03:00:00",
"End": "07/17/20 23:59:00",
"BillingHours": 21,
"BillingSeconds": 75540
}
},
"BillingSeconds": 75540,
"BillingHours": 21
},
"2020-07-18": {
"RunningPeriods": {
"Period1": {
"Begin": "07/18/20 03:00:00",
"End": "07/18/20 23:59:00",
"BillingHours": 21,
"BillingSeconds": 75540
}
},
"BillingSeconds": 75540,
"BillingHours": 21
},
"2020-07-19": {
"RunningPeriods": {
"Period1": {
"Begin": "07/19/20 03:00:00",
"End": "07/19/20 23:59:00",
"BillingHours": 21,
"BillingSeconds": 75540
}
},
"BillingSeconds": 75540,
"BillingHours": 21
},
"2020-07-20": {
"RunningPeriods": {
"Period1": {
"Begin": "07/20/20 03:00:00",
"End": "07/20/20 23:59:00",
"BillingHours": 21,
"BillingSeconds": 75540
}
},
"BillingSeconds": 75540,
"BillingHours": 21
}
}
}
Only Period1 is recognized.
Hi @prandelicious , I apologize for this issue. Can you please confirm whether actual scheduling of instance is working as expected. Also I will add this to our future release backlog as a bug fix for 'scheduler-cli describe-schedule-usage' command.
Thanks, Praveen
when scheduling these adjacent periods are merged to avoid a stop in between the two periods