I created script for this purpose that you can find on github
Precise scheduling of scripts in powershell
-
22-06-2023 - |
Question
I have number of monitoring functions that I want to execute with dynamic frequencies, depending on project. The range of frequencies are from once every second, to once a day. TaskScheduler or ScheduledJob are not precise enough for this purpose.
Is any function scheduler such as this available?
Solution 2
OTHER TIPS
Spinning up a powershell instance is not a trivial event. If you're wanting monitoring on a frequency less than a few minutes you'll be much better off to write a script that stays resident and runs in an endless process-sleep-process loop.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow