Major amendments to this script I made, please review and feel free to use #24
brt5586
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good morning, I've had to make some quite major adjustments to this which I am using in a company I work for. I thought it would be good to share with yourself - I want to so thank you for this script as Microsoft's Azure Start/Stop V2 is great but managing multiple Logic App schedules is so tedious and feels like a step backwards so this way was my goal.
So amendments I've made are the following:
1. The script now supports time zones specified in the tag value such as 'AutoShutdownSchedule' : '[TIMEZONE] 19:00->08:00' such as [BST] / [IST] and will check schedules specified in that said time zone which helps with daylight savings. (It will default to the 'Default Time Zone' variable if not specified.
2. The script now supports use of specific-day schedules such as:
'17:00->19:00, Monday: 08:30->17:00, Tuesday: 09:30->19:00, Wednesday: 11:30->12:00, Friday: 00:00->08:00, Saturday, Sunday' which means:
> Turned off everyday between 17:00 and 19:00. Each day has their own set timeframe which overrides the daily timeframe whereas on Thursday it matches back to 17:00 and 19:00 and Saturday, Sun and December 25th shutdown all day.
This allows you to now specify specific days on the schedule where you may want a whole different time frame, the way the script sees these are by prioritising the specific-day schedule if that specific-day is the current day of the run time of the script, if it's Thursday for example in the above tag value it'll revert back to the 17:00->19:00 daily schedule.
I actually made the amendments above was to meet the requirements for the company I work for so thank you very much for the original script as it has inspired this newer version I've created, below:
Beta Was this translation helpful? Give feedback.
All reactions