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
Windows 7
Last Comment
ahmad1467
8/22/2022 - Mon
dsacker
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.
ahmad1467
ASKER
Now would that be the same as pausing the task manager?
dsacker
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.
NVIT
How about...
1. Select desired tasks (Press Ctrl or Shift for multiple selections)
2. Right selection. Pick Disable
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. :)
ahmad1467
ASKER
I tired the regdit but know luck
dsacker
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"
ahmad1467
ASKER
How do I gain system rights would that be the same as administrator?
NVIT
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?
NVIT
Do you mean not stop the entire task scheduler service with NET STOP? But instead, you want to pause a certain task? If so, maybe schtasks is what you want.
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.
ahmad1467
ASKER
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