You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Troubleshoot issues with scheduled tasks not running
12
12
13
-
This article helps you troubleshoot issues where a scheduled task doesn't run as expected in Task Scheduler.
13
+
This article helps you troubleshoot issues where a scheduled task doesn't run as expected in Task Scheduler.
14
14
15
15
When you configure and schedule a task using Task Scheduler, you might encounter one of the following issues:
16
16
@@ -25,28 +25,28 @@ To troubleshoot the issue, follow these steps:
25
25
2.[Use the Status column and the History tab to check task status](#step-2-use-the-status-column-and-the-history-tab-to-check-task-status)
26
26
3.[Verify errors in the task history](#step-3-verify-errors-in-the-task-history)
27
27
28
-
## Step 1: Test your script before putting it into a task
28
+
## Step 1: Test your script before putting it into a task
29
29
30
-
Task Scheduler is the trigger of a task. If you use a script, a complete script is the prerequisite to configure a scheduled task. Test your script directly with tools like PowerShell and Command Prompt to make sure there's no error before putting it into a task.
30
+
Task Scheduler is the trigger of a task. If you use a script, a complete script is the prerequisite to configure a scheduled task. To make sure that there's no error before putting it into a task, test your script directly with tools like PowerShell and Command Prompt.
31
31
32
32
## Step 2: Use the Status column and the History tab to check task status
33
33
34
34
Check the **History** tab for specific task events. This tab allows you to determine if the task is triggered and successfully completed. For example:
35
35
36
36
:::image type="content" source="./media/troubleshoot-scheduled-tasks-not-running/task-scheduler-history-tab.png" alt-text="Screenshot that shows the History tab of Task Scheduler.":::
37
37
38
-
If the task isn't triggered, try a manual trigger. Set the trigger start time at a future time if it is a **On a schedule** trigger, and save the task again (re-register the task). If it's still not triggered, collect the task configuration by right-clicking the task and exporting it to an `.xml` file for initial checking.
38
+
If the task isn't triggered, try a manual trigger. Set the trigger start time at a future time if it's a **On a schedule** trigger, and save the task again (re-register the task). If it's still not triggered, collect the task configuration by right-clicking the task and exporting it to an `.xml` file for initial checking.
39
39
40
40
If it's already triggered, use the **Status** column and the **History** tab to check for any errors during the task execution.
41
41
42
-
Normally, the task should be in **Ready** status for it to be manually or automatically triggered. If it remains in the **Running** status for a long time, check the actions in your task. For example, if the task runs a customized application or a PowerShell script, locate the process in Task Manager. Then troubleshoot why the process keeps running and doesn’t exit by collecting dumps or other traces of a specific process.
43
-
42
+
Normally, the task should be in **Ready** status for it to be manually or automatically triggered. If it remains in the **Running** status for a long time, check the actions in your task. For example, if the task runs a customized application or a PowerShell script, locate the process in Task Manager. Then troubleshoot why the process keeps running and doesn't exit by collecting dumps or other traces of a specific process.
43
+
44
44
## Step 3: Verify errors in the task history
45
45
46
-
If there're any errors while completing the task or if the task completes successfully but doesn't show an expected output, use the following methods to further narrow down the issue:
46
+
If there are any errors while completing the task or if the task completes successfully but doesn't show an expected output, use the following methods to further narrow down the issue:
47
47
48
-
-Change your action to a simplified script to determine if the issue is with the script or application.
49
-
-[Enable transcripts](/powershell/module/microsoft.powershell.core/about/about_group_policy_settings#turn-on-powershell-transcription) to check for errors while running the PowerShell script. For batch script or others, add more output commands to trace the failure for a specific command.
48
+
-Use a simplified script to determine if the issue is related with the script or the application.
49
+
-[Enable transcripts](/powershell/module/microsoft.powershell.core/about/about_group_policy_settings#turn-on-powershell-transcription) to check for errors while running the PowerShell script. For batch script or others, add more output commands to trace the failure for a specific command.
50
50
- Change the **Security options** to **Run only when user is logged on** to determine if the issue is with security context.
0 commit comments