I have set up a task in Windows Task Scheduler to run at a specific time each day. The task simply executes a batch file I've created to restart my Windows service. This is the contents of that file:
net stop "MyService"
net start "MyService"
This seems to work well for the most part, but occasionally the service will actually pause itself, rather than stop/start. I will come back to it later on and it will just be sitting there, paused.
Why would task scheduler pause my service, rather than start it, and how can I remedy that?