1

Is there a way to temporarily pause the Windows Task Scheduler so it doesn't launch new scheduled tasks in the middle of a critical operation?

I have a PowerShell script that syncs an HA server to an offsite hot backup site. Currently my PowerShell script creates a temporary VSS snapshot and syncs from that, which works nicely with apps that are VSS-aware. However, we have an old LOB app that likes to shoot off scheduled tasks and isn't easy to manage. If I pause or delete the LOB tasks they re-appear, etc. The LOB app itself is mission critical and cannot be paused.

Basically, I don't want any new scheduled tasks kicked off during the middle of the VSS snapshot creation operation. The Task Scheduler's own VSS writer merely reports its internal backup folder locations; it does not quiesce running tasks on its own as far as I can tell.

I tried to stop/restart the Scheduler service, but Windows 8 doesn't allow that unless you are LOCAL SYSTEM, and Windows Server 2016 Tech Preview 3 doesn't even allow LOCAL SYSTEM to stop it. Stopping the Task Scheduler isn't generally a good idea anyway, since it kills all running tasks. I learned this the hard way on Windows Server 2016 DC (TechPreview 3) when Microsoft added a new undocumented task called "CreateExplorerShellUnelevatedTask", which kills every user's desktop whenever the Task Scheduler service is stopped (ouch).

  • 1
    Although the Windows Task Scheduler purports to have originally been designed for supporting non-essential tasks, all recent Windows versions (i.e., 8, 10) now seem to critically depend on this facility. In one case, for example, after disabling a permissions-setting task which fires on each logon/logoff, I got permanently locked out of the only enabled user account on the machine, essentially bricking the machine. – Glenn Slayden Nov 19 '16 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.