Avatar of ahmad1467
ahmad1467
Flag 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
Windows 7

Avatar of undefined
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.
Your help has saved me hundreds of hours of internet surfing.
fblack61
ahmad1467

ASKER
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
ahmad1467

ASKER
It shows the option but they are grayed out.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
dsacker

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).
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
McKnife

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.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ahmad1467

ASKER
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.

Disable a Task from Running:
https://technet.microsoft.com/en-us/library/cc766529.aspx

https://social.technet.microsoft.com/Forums/windowsserver/en-US/f694b934-e2a7-44c8-a48d-ae13eec9aa4b/how-to-run-schtasksexe-to-disableenable-a-specified-task-without-giving-userid-and-password-just?forum=winserverManagement

Syntax and examples:
More Examples:
https://technet.microsoft.com/en-us/library/bb490996.aspx
ahmad1467

ASKER
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.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
McKnife

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
ASKER CERTIFIED SOLUTION
McKnife

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ahmad1467

ASKER
Okay thanks I will give this a try.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ahmad1467

ASKER
This worked out good