I am currently using PowerShell and Task Scheduler to automate a task for the business where I currently work. This script updates a list and will ideally be run every 10 minutes. The computer that we use to run this recurring script can be a little janky and will randomly shut down. I'm trying to find a way to get alerts if computer running the script is offline.
The main way I'm thinking to do this would be to setup a notification for each time the program runs, then have a second script check the notification. If there is a missing notification indicating the script didn't run, it sends an alert. I found an answer that takes me partway to an answer but I don't think it would work if the machine shuts down.
Make Windows Task Scheduler alert me on fail
Thank you for your time helping with this question.