1
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.
1I think that most of the solutions to this problem would require a second computer, in which case it would be better just to move the original script to that computer. An alternative might be to save a log file containing when the script ran to cloud storage that you can check from anywhere. – Worthwelle – 2020-02-03T16:12:37.247