Link to home
Start Free TrialLog in
Avatar of ahmad1467
ahmad1467Flag for United States of America

asked on

How to pause Windows task scheduler

Hello,
We utilize the Windows task scheduler for a number of frequent automated jobs.
However, from time to time we need to process a task that requires us to pause the task scheduler first so that a scheduled task does not fire in the middle of a manual process.  Before on our Win XP machine
We could pause the scheduler easily by opening the task scheduler, and using the option "Pause Task Scheduler but now in my new Windows & machine I don’t see this option. Is there a way to do this in Windows 7

Thanks
Avatar of dsacker
dsacker
Flag of United States of America image

You can issue the command:

net stop "Task Scheduler"
Then after you're done, issue the command:

net start "Task Scheduler"
Obviously, it requires elevation.
Avatar of ahmad1467

ASKER

Now would that be the same as pausing the task manager?
It stops it temporarily. If you want to "pause" it in the proper sense, there is also:

net pause "Task Scheduler"
Then after you are done, issue the command:

net continue "Task Scheduler"
The "Task Scheduler" is a service. Stopping it will stop anything it is running. Pausing it will allow other tasks to run (and complete).

So you would choose on the basis of whether you need to stop it completely or allow anything else it is running to also run. But you have the advantage of both.
I tried the CMD and this is what I got.
C:\Windows\system32>net pause "Task Scheduler"
The requested pause, continue, or stop is not valid for this service.

More help is available by typing NET HELPMSG 2191.
How about...
1. Select desired tasks (Press Ctrl or Shift for multiple selections)
2. Right selection. Pick Disable
It shows the option but they are grayed out.
Well, this is interesting. Windows 7 (and on) has done a good job of blocking the stopping of the Task Scheduler. It seems if you really want to, you'll have to do it via the registry:

In regedit, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Schedule. Change the REG_DWORD called "Start" from 2 to 4. Restart and test.

Might want to do this in a box that doesn't matter first. :)
I tired the regdit but know luck
Did you restart the service or reboot the machine, then check if you could pause or stop via commands?

Also, remember to use elevated priority, although I'm getting a feel that Microsoft really doesn't want that being tampered with (grin).
Simple thing: use psexec with system rights like this:
1 download pstools which contain psexec
2 psexec -s -i net stop "task scheduler"
How do I gain system rights would that be the same as administrator?
The -s switch in psexec runs NET.EXE as the Local System account.

> ...would that be the same as administrator?
If you mean local administrator... Yes and No.
Yes because you need at least local administrator to run psexec with the -S switch.
No because local system account doesn't have access to all items a local admin would have.

If you mean domain administrator... No. As with local admin, local system account doesn't have access to all items a domain admin would have.
Thanks! Psexec worked but do you if there is a way to pause it?
Before this windows 7 machine I had a windows XP system that ran task scheduler with about 20 different tasks that run probable ever 10 to 15 minutes. Most of the task are connected to data bases that get corrupt when they stop before the program completes but in the XP system under actions I had the option to pause all the task after they completed so I am just trying to get this function back.
Xp had no pause, but you disabled the tasks. You can do the same in win7. Right click a task and select disable.
Sorry maybe I phrased it wrong but in XP there is this pause task option that allowed me to pause the task scheduler and would let any open task finish but wouldn’t let any new tasks start. I have attached a screenshot with that option.
2015-04-17-125949.jpg
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Okay thanks I will give this a try.
This worked out good