Troubleshooting: Scheduled Data Collector Sets Failing in Windows Server

Table of Contents

Troubleshooting Scheduled Data Collector Sets Failing in Windows Server

This article addresses a specific issue encountered in certain versions of Windows Server and Windows 10 where user-defined data collector sets, designed to run on a schedule, fail to execute as expected. This problem can lead to a lack of performance data collection, hindering system monitoring and analysis efforts. Understanding the symptoms, cause, and available workarounds is crucial for administrators to maintain effective performance monitoring in their Windows environments. This guide will walk you through identifying this issue and implementing a practical solution.

Symptoms

The primary symptom of this problem is the failure of scheduled data collector sets to run despite being configured correctly within the Performance Monitor. You will typically notice this issue when you have created a user-defined data collector set in the Performance > Data Collector Sets > User Defined folder of the Computer Management console. A schedule is meticulously configured as part of the data collector set’s definition to ensure automated data collection at specific times.

However, when the scheduled run time arrives, the Performance Monitor inexplicably does not initiate data collection. If the data collector set was configured to diligently save collected data to a file for later analysis, you will observe that the designated file is not created, and consequently, no performance data is saved. This lack of data can be particularly problematic for long-term trend analysis and proactive issue identification.

Interestingly, upon inspecting the Task Scheduler, the task history associated with the data collector set misleadingly reports that the task ran successfully. This can create confusion as the system indicates successful execution while the actual outcome – data collection – is absent. Despite the “success” status in Task Scheduler, the scheduled task effectively performs no action, leaving the data collector set dormant.

Further investigation within Task Scheduler reveals a critical anomaly. If you open the properties of the scheduled task and navigate to the Actions tab, the action list unexpectedly contains Custom Handler. This is a significant deviation from the expected configuration.

Task Scheduler Actions Custom Handler

The expected action for a correctly configured scheduled data collector set task should be Start a program. This action typically includes the specific commands and arguments necessary to initiate the data collector set, ensuring proper execution. The presence of Custom Handler instead of Start a program is a clear indicator of the underlying issue preventing the scheduled data collector set from running correctly. This unexpected action type is the key to diagnosing this particular problem.

Cause

The root cause of this issue lies in a change introduced in Windows 10 version 1703 and Windows Server version 1703, affecting how scheduled tasks are automatically generated for data collector sets. Starting with these versions, the mechanism for creating these scheduled tasks underwent a modification. This change, unfortunately, resulted in the actions for these tasks being incorrectly configured during creation.

Specifically, instead of generating a Start a program action, the system erroneously creates a Custom Handler action for scheduled data collector set tasks. This incorrect action type prevents the task from properly initiating the data collector set at the scheduled time. The system attempts to execute a custom handler that is not correctly defined or implemented for this purpose, leading to the observed failure.

This change in task creation methodology was intended to improve or modify task scheduling functionality, but inadvertently introduced this flaw specifically affecting data collector sets. The issue is not a general Task Scheduler problem but rather a specific consequence of how data collector set scheduling interacts with the updated task creation process in these and subsequent affected Windows versions. The core problem is the misconfiguration of the task action, which is the direct result of the change in how scheduled tasks are automatically created for data collector sets from Windows 10 version 1703 and Windows Server version 1703 onwards, until the fix was implemented in later versions.

Resolution

The good news is that this issue has been officially addressed and resolved by Microsoft. The resolution is included in Windows 10, version 2004 and later versions, as well as in Windows Server, version 2004 and later versions. Upgrading your affected systems to these versions or newer is the recommended and permanent solution to this problem.

By upgrading to a resolved version, the system will correctly create scheduled tasks for data collector sets with the proper Start a program action. This ensures that scheduled data collector sets will run as intended, automatically collecting performance data according to their configured schedules. Microsoft’s updates incorporate the necessary fixes to revert or correct the problematic change introduced in earlier versions, thus restoring the expected behavior of scheduled data collector sets.

Therefore, for a definitive and long-term solution, administrators are strongly advised to plan and implement upgrades to Windows 10 or Windows Server version 2004 or later. This approach not only resolves the scheduled data collector set issue but also brings numerous other improvements, security updates, and new features inherent in the newer operating system versions, contributing to a more stable and feature-rich environment. Before undertaking any upgrade, it is always recommended to review the release notes and compatibility information for the target version to ensure a smooth and successful transition.

Workaround

While upgrading to a resolved version is the ideal solution, a workaround is available for systems that cannot be immediately upgraded. This workaround involves manually correcting the scheduled task associated with the affected data collector set. By manually modifying the task, you can change the incorrect Custom Handler action to the correct Start a program action, enabling the scheduled task to function as intended.

To implement this workaround, follow these detailed steps:

  1. Open Task Scheduler: Begin by launching the Task Scheduler application. You can do this by searching for “Task Scheduler” in the Windows search bar and selecting the application.

  2. Locate the Task: Navigate to the location of the scheduled task associated with your data collector set. These tasks are typically located under Task Scheduler Library > Microsoft > Windows > PLA. Within the PLA folder, you should find the task corresponding to your user-defined data collector set. The task name will usually be closely related to the name you assigned to your data collector set.

  3. Open Task Properties: Once you have located the correct task, right-click on it and select Properties from the context menu. This will open the properties dialog box for the scheduled task.

  4. Navigate to the Actions Tab: In the Task Properties dialog box, click on the Actions tab. This tab displays the actions currently configured for the task.

  5. Examine the Action: Review the action listed. As identified in the Symptoms section, you will likely see Custom Handler listed as the action. This is the incorrect action that needs to be changed.

  6. Edit the Action: Select the Custom Handler action and click the Edit… button. This will open the Edit Action dialog box.

  7. Change Action Type: In the Edit Action dialog box, locate the Action dropdown menu. Click on this dropdown and change the selected action type from Custom Handler to Start a program.

Task Scheduler Edit Action Start a program

  1. Configure Program/Script: After selecting Start a program, you need to configure the program or script to be executed. This is crucial for the data collector set to run correctly. You will need to enter the following information:

    • Program/script: Enter the path to the Performance Monitor executable, which is typically: C:\Windows\system32\perfmon.exe
    • Add arguments (optional): Enter the following arguments: /s "<DataCollectorSetName>". Replace <DataCollectorSetName> with the exact name of your data collector set. Ensure the data collector set name is enclosed in double quotes if it contains spaces. For example, if your data collector set is named “My Data Collection”, the arguments should be /s "My Data Collection".
    • Start in (optional): Leave this field blank.

    Task Scheduler Edit Action Program Details

  2. Click OK to Save: After entering the program path and arguments, click OK in the Edit Action dialog box to save the changes.

  3. Click OK in Task Properties: Click OK in the Task Properties dialog box to save all changes to the scheduled task.

  4. Test the Task: To verify that the workaround is successful, you can manually run the scheduled task. Right-click on the task in Task Scheduler and select Run. Monitor Performance Monitor to confirm that data collection starts as expected. If you configured data saving, check if the output file is created and contains data.

By completing these steps, you have manually corrected the scheduled task to use the Start a program action with the necessary parameters. This workaround should enable your scheduled data collector sets to run correctly on affected versions of Windows. Remember that this is a manual workaround, and upgrading to a resolved version remains the permanent and recommended solution.

This manual fix will ensure your scheduled data collector sets function correctly until you can implement a full system upgrade. While effective, remember to apply this workaround to all affected data collector set tasks.

Do you have any questions or further insights on troubleshooting scheduled data collector sets? Share your thoughts in the comments below!

Post a Comment