AnykeyNL / OCI-AutoScale

Automatic Scaling for OCI BM Database Cloud Service (Schedule based)
Universal Permissive License v1.0
112 stars 64 forks source link

Modify weekend/weekday check to take into account 0 based index #3

Closed Reuenthal767 closed 4 years ago

Reuenthal767 commented 4 years ago

Hello @AnykeyNL first things first: thank you for you work! While using your script I've noticed that my staging machines were not being shut down on Saturday for the whole 24 hours while instead everything was being shut down correctly on Sunday.

It seems that the DayOfWeek array is 0 based and so to fix my issue I just needed to decrease the number we are comparing the day to from 6 to 5.