powershell task scheduler or loop and sleep
Posted
by
Paddy Carroll
on Super User
See other posts from Super User
or by Paddy Carroll
Published on 2012-11-27T09:37:28Z
Indexed on
2012/11/27
11:08 UTC
Read the original article
Hit count: 301
I have a job that needs to go off every minute or so, it loads a DLL written in C# that retrieves state for an SQL Server Mirror (Primary, Mirror and witness) for a number of databases; it allows us to poke DNS to show where the primary instances are. Please don't mention Clustering - We're not doing that.
I can't be arsed to write a service, there simply isn't enough time
do I
- Task Scheduler - every minute: Invoke a powershell script that loads the DLL does the business
- Task scheduler - At Startup : Invoke a similer powershell script that loads the DLL once but then loops and sleeps, refreshing the Object that the DLL exposes.
Pros and cons?
© Super User or respective owner