Skip to content

Commit 6252f87

Browse files
authored
update
1 parent fc5cb34 commit 6252f87

1 file changed

Lines changed: 26 additions & 22 deletions

File tree

support/windows-client/system-management-components/task-schedular-service-is-not-available.md

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ Use the following steps to resolve the issue:
3131
> [!NOTE]
3232
> [At](/windows-server/administration/windows-commands/at) tasks refer to tasks scheduled to run automatically by the OS using the `at` command. It's a legacy command in Windows for scheduling tasks at specified time and date. These tasks are managed by the Task Scheduler service. After an OS upgrade, such tasks might fail due to compatibility issues or problems with the Task Scheduler service. This could affect the successful launch of Task Scheduler.
3333
34-
Check the **C:\Windows\System32\Tasks** folder to determine if you have any `at` tasks created under Task Scheduler. If so, the tasks are listed under the following locations. For example:
34+
Check the **C:\\Windows\\System32\\Tasks** folder to determine if you have any `at` tasks created under Task Scheduler. If so, the tasks are listed under the following locations. For example:
3535

36-
- **C:\Windows\System32\Tasks**
37-
- **C:\Windows\System32\Tasks\At1**
38-
- **C:\Windows\System32\Tasks\At2**
36+
- **C:\\Windows\\System32\\Tasks**
37+
- **C:\\Windows\\System32\\Tasks\\At1**
38+
- **C:\\Windows\\System32\\Tasks\\At2**
3939

40-
- **C:\Windows\Tasks**
41-
- **C:\Windows\Tasks\At1.job**
42-
- **C:\Windows\Tasks\At2.job**
40+
- **C:\\Windows\\Tasks**
41+
- **C:\\Windows\\Tasks\\At1.job**
42+
- **C:\\Windows\\Tasks\\At2.job**
4343

4444
To resolve this issue, clean up the legacy tasks by using the following steps:
4545

@@ -50,22 +50,26 @@ To resolve this issue, clean up the legacy tasks by using the following steps:
5050
1. Download [PsTools](/sysinternals/downloads/pstools) and extract the file.
5151
2. Go to the extracted PsTools directory and run the following command from an administrative Command Prompt (**cmd.exe**) window:
5252

53-
`psexec.exe -s -i cmd.exe`
53+
```console
54+
psexec.exe -s -i cmd.exe
55+
```
5456

5557
3. After you accept the end-user license agreement (EULA), another **cmd.exe** process opens. Type `whoami` in the command prompt, and you should receive the output `nt authority\system`.
5658
4. Run this command:
5759

58-
`net stop schedule`
60+
```console
61+
net stop schedule
62+
```
5963

6064
2. After the Task Scheduler service is stopped successfully, delete the files for `at` tasks after backup if they exist. Here are some examples:
6165

62-
- **C:\Windows\System32\Tasks**
63-
- **C:\Windows\System32\Tasks\At1**
64-
- **C:\Windows\System32\Tasks\At2**
66+
- **C:\\Windows\\System32\\Tasks**
67+
- **C:\\Windows\\System32\\Tasks\\At1**
68+
- **C:\\Windows\\System32\\Tasks\\At2**
6569

66-
- **C:\Windows\Tasks**
67-
- **C:\Windows\Tasks\At1.job**
68-
- **C:\Windows\Tasks\At2.job**
70+
- **C:\\Windows\\Tasks**
71+
- **C:\\Windows\\Tasks\\At1.job**
72+
- **C:\\Windows\\Tasks\\At2.job**
6973

7074
3. Clear the schedule entries from the registry:
7175

@@ -75,16 +79,15 @@ To resolve this issue, clean up the legacy tasks by using the following steps:
7579

7680
- `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{1}`
7781

78-
`Path`=`\\At1`
82+
`Path`=`\\At1`
7983

8084
- `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{2}`
8185

82-
`Path`=`\\At2`
86+
`Path`=`\\At2`
8387

8488
4. Delete the following keys if they exist:
8589

8690
- `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{xxxxxxxx-EC79-4064-9831-xxxxxxxxxxxx}`
87-
8891
- `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{xxxxxxxx-FB9E-4BDD-8FED-xxxxxxxxxxxx}`
8992

9093
5. Go to `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree`, and delete the keys ending in `At1`, `At2`, `At3` … or more if they exist. Those keys end with `At<#>`, for example:
@@ -93,12 +96,13 @@ To resolve this issue, clean up the legacy tasks by using the following steps:
9396
> [Back up](https://support.microsoft.com/topic/855140ad-e318-2a13-2829-d428a2ab0692) the `Tree` key before proceeding with the next steps.
9497
>
9598
> - `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\At1`
96-
>
9799
> - `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\At2`
98100

99101
4. Go back to the command prompt opened using the `psexec` command, and then run the following command to start the Task Scheduler service:
100102

101-
`netsh start schedule`
103+
```console
104+
netsh start schedule
105+
```
102106

103107
## Step 2: Delete corrupted tasks and then create them again if needed
104108

@@ -122,10 +126,10 @@ If you have cleaned up the `at` tasks or you don't have `at` tasks, you might ha
122126
> [!NOTE]
123127
> Before you proceed with the following steps, back up the following items:
124128
>
125-
> - The folder **%SYSTEMDRIVE%\Windows\System32\Tasks**
129+
> - The folder **%SYSTEMDRIVE%\\Windows\\System32\\Tasks**
126130
> - The registry key `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\`
127131

128-
1. Delete the task file that corresponds to the corrupted task from the Tasks folder (%SYSTEMDRIVE%\Windows\System32\Tasks).
132+
1. Delete the task file that corresponds to the corrupted task from the Tasks folder (**%SYSTEMDRIVE%\\Windows\\System32\\Tasks**).
129133
2. Go to the registry subkey `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree`. Note down the `Id` value (in GUID format) of each task that needs to be deleted corresponding to the corrupted task.
130134

131135
Delete the registry subkey that corresponds to the corrupted task from `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree`.

0 commit comments

Comments
 (0)