任务计划程序是(Task Scheduler)Windows 操作系统(Windows OS)中的一个内置组件,可让用户在特定日期和时间安排任务(schedule tasks)(如安排关机或重新启动)。(Scheduling a Shutdown or Restart)在其界面上,您可以看到每个计划任务的状态。
如果您看到状态为Ready,则表示特定任务已启用。另一方面,如果它显示状态为Disabled,则表示特定任务已被禁用。用户还可以手动更改计划任务的状态。
如果计划了一些不必要的任务并且您想在Windows 11/10禁用此类计划任务(disable such scheduled tasks),那么这篇文章可以帮助您使用一些内置选项。您还可以随时重新启用计划任务。
Windows 11/10中启用或禁用计划任务
您可以通过三种方式启用或禁用计划任务。这些都是:
- 使用任务计划程序
- 使用命令提示符
- 使用 Windows PowerShell。
让我们看看怎么做。
1]使用任务计划程序
以下步骤将指导您如何使用任务计划程序(Task Scheduler)来启用或禁用计划任务:
- 单击 Windows 搜索框
- 类型任务调度程序(task scheduler)
- 按Enter键打开任务计划程序(Task Scheduler)窗口
- 展开左侧面板上可用的任务计划程序库文件夹(Task Scheduler Library)
- 选择您要禁用的计划任务所在的文件夹
- 选择一个计划任务
- 右键单击选定的任务
- 单击禁用(Disable)选项。
这将立即禁用该任务。要启用计划任务,只需使用上述步骤,并在最后一步中使用启用选项。(Enable)
2]使用命令提示符
以下是使用命令提示符(Command Prompt)启用或禁用计划任务的步骤:
- 以管理员身份运行命令提示符(Run Command Prompt as an administrator)
- 要禁用计划任务,请键入并执行以下命令:
schtasks /Change /TN "\FolderName\TaskName" /Disable
- 要启用计划任务,请执行以下命令:
schtasks /Change /TN "\FolderName\TaskName" /Enable
请注意,在上述两个命令中,您必须将FolderName和TaskName替换为(TaskName)Task Scheduler中可用的实际文件夹名称和任务名称。
阅读(Read):如何在 Windows 任务计划程序中重命名计划任务。
3]使用Windows PowerShell
使用Windows PowerShell(Windows PowerShell)启用或禁用计划任务的步骤如下:
- (Launch Windows PowerShell as administrator)使用搜索框或其他方式以管理员身份启动 Windows PowerShell
- 运行以下命令以禁用计划任务:
Disable-ScheduledTask -TaskPath "\FolderName\" -TaskName "Enter TaskName"
- 要启用任务,请运行以下命令:
Enable-ScheduledTask -TaskPath "\FolderName\" -TaskName "Enter TaskName"
在上述两个命令中,您必须输入Task Scheduler(Task Scheduler)中存在的确切文件夹名称和任务名称。
在命令提示符(Command Prompt)或PowerShell中执行命令后,您可以在任务计划程序(Task Scheduler)窗口中检查任务的状态。如果未显示更新状态,请右键单击“任务计划程序(Task Scheduler)”窗口中间窗格中的空白区域,然后选择“刷新(Refresh)”选项。
可以禁用任务计划程序(Task Scheduler)吗?
不,禁用Task Scheduler Service(Task Scheduler Service)是不行的。Windows 操作系统(Windows OS)需要它,因为它执行用户定义的任务并运行系统任务。如果您永久或暂时禁用任务计划程序(Task Scheduler),它将停止执行多个系统任务。因此,您可能会在计算机上遇到几个严重的错误或问题。因此(Therefore),不建议禁用任务计划程序。(Task Scheduler)
如何启用计划任务历史记录?
默认情况下,任务计划程序(Task Scheduler)中的任务历史记录选项处于禁用状态。如果要启用它,请按照以下步骤操作:
- 打开任务计划程序窗口
- 单击左侧面板上可用的任务计划程序(本地)(Task Scheduler (Local))
- 点击操作(Action)菜单
- 选择启用所有任务历史记录(Enable All Tasks History)选项。
要查看特定任务的任务历史记录,请右键单击该任务,然后单击属性(Properties)。之后,单击“历史记录”(History)选项卡。或者,您也可以选择一个任务,然后单击任务计划程序中间窗格中的“(Task Scheduler)历史记录”(History)选项卡。它将显示与该特定任务相关的整个历史记录。
就是这样。
阅读下一篇(Read next):系统计划程序:Windows 的任务计划程序替代品。
How to enable or disable Scheduled Task in Windows 11/10
Task Scheduler is a built-in component in Windows OS that lets the user schedule tasks (like Scheduling a Shutdown or Restart) for a particular date and time. On its interface, you can see the status of every scheduled task.
If you see the status as Ready, it means that the particular task is enabled. On the other hand, if it shows the status as Disabled, that means the particular task has been disabled. Users can also change the status of the scheduled tasks manually.
If there are some unnecessary tasks scheduled and you want to disable such scheduled tasks in Windows 11/10, then this post can help you with some built-in options. You can also re-enable a scheduled task anytime you want.
Enable or disable scheduled tasks in Windows 11/10
You can enable or disable the scheduled tasks in three ways. These are:
- Using Task Scheduler
- Using Command Prompt
- Using Windows PowerShell.
Let’s see how to do it.
1] Using Task Scheduler
The following steps will guide you on how to use Task Scheduler to enable or disable the scheduled tasks:
- Click on the Windows Search box
- Type task scheduler
- Press the Enter key to open the Task Scheduler window
- Expand the Task Scheduler Library folder available on the left panel
- Select the folder under which you have scheduled tasks that you want to disable
- Select a scheduled task
- Right-click on the selected task
- Click on the Disable option.
This will disable that task immediately. To enable a scheduled task, simply use the above steps, and use the Enable option in the last step.
2] Using Command Prompt
Here are the steps to enable or disable a scheduled task using Command Prompt:
- Run Command Prompt as an administrator
- To disable a scheduled task, type and execute the following command:
schtasks /Change /TN "\FolderName\TaskName" /Disable
- To enable a scheduled task, execute the following command:
schtasks /Change /TN "\FolderName\TaskName" /Enable
Do note that in the above two commands, you have to replace the FolderName and TaskName with the actual folder name and task name that are available in the Task Scheduler.
Read: How to rename scheduled task in Windows Task Scheduler.
3] Using Windows PowerShell
The steps to enable or disable a scheduled task using Windows PowerShell are as follows:
- Launch Windows PowerShell as administrator using the Search box or other ways
- Run the following command to disable a scheduled task:
Disable-ScheduledTask -TaskPath "\FolderName\" -TaskName "Enter TaskName"
- To enable a task, run the following command:
Enable-ScheduledTask -TaskPath "\FolderName\" -TaskName "Enter TaskName"
In the above two commands, you must enter the exact folder name and task name that are present in the Task Scheduler.
After executing the commands in Command Prompt or PowerShell, you can check the status of the task in the Task Scheduler window. If it does not display the updated status, right-click in the empty space in the middle pane of the Task Scheduler window, and select the Refresh option.
Is it okay to disable Task Scheduler?
No, it is not OK to disable the Task Scheduler Service. It is required by the Windows OS as it executes the user-defined tasks and also runs the system tasks. If you disable the Task Scheduler permanently or temporarily, it will stop several system tasks from executing. Due to this, you may encounter several serious errors or issues on your computer. Therefore, disabling the Task Scheduler is not recommended.
How do I enable Scheduled task history?
By default, the task history option is disabled in the Task Scheduler. If you want to enable it, follow the steps mentioned below:
- Open the Task Scheduler window
- Click on Task Scheduler (Local) available on the left panel
- Click on the Action menu
- Select Enable All Tasks History option.
To view the task history for a particular task, right-click on that task and then click Properties. After that, click on the History tab. Or else, you can also select a task, and then click on the History tab available in the middle pane of Task Scheduler. It will show the entire history related to that particular task.
That’s it.
Read next: System Scheduler: Task Scheduler alternative for Windows.