Time to read: ~ 2 minutes
It’s my first SQL Saturday since moving back to Ireland. I figure that it’ll be easier to go to these now that I have a car again and can drive where they are.
The only problem is that this particular SQL Saturday is down in Cork, starting at 08:00 in the morning. That means a 04:30 start for me to get there in time.
Something people may not know about me is that I am not a morning person!
I also like helping out so for the very first session I was given the task of letting the speaker know how much time that they had left for their session.
So there’s me in the corner, holding up laminated pages with the number 30, 15, 10, and 5 in big, bold font on them and holding them up when time passed.
Thankfully the speaker was engaging and enthusiastic, and the session was new and interesting to me because otherwise I was freaking out that I would fall asleep and fail to actually do anything!
This got me thinking if there was anyway to automate myself out of this equation…
It’s really interesting and I’ve been looking for an opportunity to use it; this defintiely counts!
So I created a function use Burnt Toast to pop up a notification in the bottom corner of the screen after a set amount of time.
So for SQL Saturday Cork, all we’d need to do is run the following code in a new PowerShell console on the speakers laptop and they’d get a notification after 30 minutes, 15 minutes after that, 10 minutes after that, and 5 minutes after that with a final notification after that saying “TIME!”
The script is up on my github, and there’s so much to improve upon it.
- Ability to run this in the background;
- Create proper Pester tests;
- Proper verbose output and debugging output; and
- Ensure all the dependencies are there before running the script.
Here’s a gist of the script in the meantime before improvements take place: