I created script for this purpose that you can find on github
Precise scheduling of scripts in powershell
-
22-06-2023 - |
Pregunta
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?
Solución 2
Otros consejos
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.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow