Skip to technology filters Skip to main content
Dynatrace Hub

Extend the platform,
empower your team.

Popular searches:
Home hero bg
Windows scheduled tasksWindows scheduled tasks
Windows scheduled tasks

Windows scheduled tasks

Monitor your Windows scheduled tasks and alert on execution issues.

Extension
Free trial
Open any of your configured hosts to view the scheduled tasks running on it. Use the drilldowns provided to explore each task in more detail.The Davis AI will automatically open a Problem when a task has not completed successfully. You can also enable alerts for hanging tasks and missed executions.Make use of the Unified Analysis screens to explore all scheduled tasks in your environment.Ingesting events from the Windows Event log gives a complete picture into the execution stages and issues encountered by the task scheduler
  • Product information
  • Release notes

Overview

This is a OneAgent extension running on Windows servers. Every minute, the extension interrogates the system for details about your configured scheduled tasks and sends Dynatrace the current state each task is in along with the time that passed since their last executions.

A problem is created automatically for any task which registered an operational failure (failed to launch, execute, or complete). Additionally, problems can also be enabled for tasks which are taking longer than expected to complete or ones which have missed their expected scheduled execution.

Use cases

  • Track the state of scheduled tasks
  • Alert on failed executions, hanging tasks, and missed runs

Get started

Setup on the Windows host

  1. Enable Windows Event Log for querying
    • Windows Event Logs are enabled for programmatic querying through registry keys
    • On the target system, create a key called Microsoft-Windows-TaskScheduler/Operational in the registry at location Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog
    ⚠️NOTE: The name of the key (folder) must be Microsoft-Windows-TaskScheduler/Operational. It's not two nested folders (common mistake)
  2. Check permissions for task configuration files
    • The extension reads task details directly from their configuration files. These are stored relative to the base location of C:\Windows\System32\Tasks
    • Ensure the files of all monitored tasks are readable by the LOCAL_SERVICE user account

Extension configuration

First, add the extension to your environment, then create a monitoring configuration.

After selecting a scope for the configuration, you must provide details about which tasks you want to monitor and to what level.

In the Scheduled Tasks Configuration section:

  • Ingest events - when enabled, all Task Scheduler events (from the Windows Event Log) used by the extension will also be ingested in Dynatrace.
  • Allow merging events - When enabled, common alerting events are merged into existing problems. Otherwise, new problems are created every time.
  • Allow frequent issue detection - When enabled, repeating error events may be suppressed from alerting and labelled as Frequent Issues.
  • Suppress alerts by event ID - Allows you to enter windows event IDs (separated by semicolon) which should not open Problems when detected.

In the Tasks to monitor section:

  • Click the Add item button to add each of the tasks you want to monitor.
  • For each task configure:
    • Task name - this must match the name of the task as it appears in Task Scheduler.
    • Task path - this is the folder path within the Task Scheduler. Leave "\" if your tasks are in the base folder, otherwise add the path to the task's folder.
    • Auto-detect timeout - When enabled, the extension will read the task's configured timeout from its configuration file and set up alerting based on this value. Disabling this setting allows you to specify a manual value for alerting. Alerting for timeouts will be disabled if no value is provided.
    • Auto-detect execution frequency - When enabled, the extension will read the task's configured frequency from its configuration file and set up alerting based on this value. Disabling this setting allows you to specify a manual value for alerting. Alerting for missed executions will be disabled if no value is provided.

Details

By default, the extension produces two metrics:

  • Task state - can be used to understand which state each task is in
  • Time since last execution - tracks how long has passed since a task last ran

You can find these by navigating to Metrics, then filtering by the tag ScheduledTasks.

In addition, with the Ingest events option, the extension will also produce log records. These can be found in the log viewer by filtering for log.source == "Microsoft-Windows-TaskScheduler/Operational"

Compatibility information

  • Microsoft Windows 2012 R12 and newer.
  • Minimum OneAgent version 1.275.0

FAQ

How and when are problems opened for task timeouts and missed runs?

Every Windows Event processed by the extension regarding a task will update the task's state. Whenever the task enters the Running state, a timestamp is kept for later reference. This timestamp is evaluated when alerting about timeouts and missed runs.

  • Task TaskName appears to be hanging:

    This is controlled by the "timeout" setting on each task which can be either auto-detected from the Scheduler's configuration, overriden with a manual value, or disabled if the value is set to 0.

    Every minute in which the task is still in Running state, the extension calculates how long has passed since the task entered the Running state. If the value exceeds the timeout value, a problem is raised.

  • Task TaskName did not run on time:

    This is controlled by the "execution frequency" setting on each task which can be either auto-detected from the Scheduler's configuration, overriden with a manual value, or disabled if the value is set to 0.

    Every minute, the extension calculates how long has passed since the task last entered a Running state. If the value exceeds the expected frequency value, the task is assumed to have missed its scheduled run and a problem is raised.

What Windows Events will open a problem?

In addition to the timeouts and missed runs mentioned above, the extension will also automatically open a problem with one of these titles whenever any of the listed events are recorded for the scheduled task:

  • Task failed to start:
    • 101 (Failed to start the task)
    • 103 (Failed to start the instance of the task)
    • 104 (Logon failure)
    • 112 (Network unavailable)
    • 130 (Service is busy)
    • 203 (Unknown/generic error)
    • 204 (Could not retrieve trigger events)
    • 205 (Trigger event pattern failed to match)
    • 305 (Unknown/generic error)
    • 322 (Another instance already running)
    • 326 (PC running on batteries)
    • 332 (User not logged in)
  • Task execution failed:
    • 126 (General failure)
    • 127 (Shutdown race condition)
  • Task failed to complete:
    • 111 (Terminated due to timeout)
    • 202 (Unknown/generic error)
    • 323 (Terminated to start new intance)
    • 327 (Terminated, PC switched to battery)
    • 328 (Terminated, computer not idle anymore)
    • 329 (Terminated due to timeout)
    • 330 (Stopped by user)
    • 331 (Running due to timeout mechanism failure)

Events can be ignored from alerting by using the Suppress alerts by event ID configuration parameter introduced in version 3.2.9.

What is Unknown state for a task?

Whenever a monitoring configuration is created or updated, all tasks are created with the default state Unknown until the monitoring receives any event about the task to change its state.

If your tasks remain in Unknown state despite other events happening, it may indicate there is an issue with reading Windows Event Logs. Check that the Windows host has been correctly configured.

Dynatrace
By Dynatrace
Dynatrace support center
Subscribe to new releases
Copy to clipboard

Extension content

Content typeNumber of items included
screen logs cards
1
screen injections
1
screen properties
1
screen chart groups
1
generic relationship
1
dashboards
1
screen actions
2
screen layout
1
metric metadata
2
list screen layout
1
screen entities lists
2
generic type
1

Related to Windows scheduled tasks

OneAgent logo

OneAgent

The simplest way to capture all observation signals automatically and in context

Windows logo

Windows

Windows server performance with real-time metrics and automated issue detection

Full version history

To have more information on how to install the downloaded package, please follow the instructions on this page.
ReleaseDate

Full version history

Fixed in this version:

  • Incorrect time conversions would cause wrong alerting behaviour for custom timeouts & frequencies

Full version history

Fixed in this version:

  • Only the final error event would open a Problem. Now all failure-indicating events open problems.

Full version history

Fixed in this version:

  • Problem details would not be fully parsed resulting in less problems open
  • Metrics were not linked to tasks found in root location (\)

Full version history

Fixed in this version:

  • Tasks would not be recognized correctly on French locale systems

Improved in this version:

  • A larger timeframe with buffer are employed to work around any potential delays from Windows Log Event writing
  • The Event ID is included in any problems triggered from a Task Scheduler Event

Full version history

New in this version:

  • A configuration parameter to allow supressing alerts from certain Windows Events. This allows modifying the default list of events for which the extension would open a Problem.

Full version history

Fixed in this version

  • In very rare cases some events might be skipped due to event log delays

Full version history

🪲 Fixed in this version:

  • Tasks with similar names would sometimes be conflated in Dynatrace.

Full version history

✨ New in this version:

  • Added the option to auto-discover scheduled tasks.
  • Added an overview dashboard.

🪲 Fixed in this version:

  • The custom task frequency setting was being incorrectly interpreted as hours instead of minutes. ⚠️If you were previously using custom task frequency, this fix may lead to a higher number of problems being raised as the value is now properly interpreted.⚠️

  • Tasks with timeout PT0S (no timeout) were being incorrectly classified as having a 0 second timeout.

Full version history

🪲 Fixed in this version:

  • Checking missed runs would error due to variable reference before assignment
  • Extension signature was updated to the new Dynatrace certificate

Full version history

🪲 Fixed in this version:

  • Task 'name' reference would cause errors when checking timeouts

Full version history

🪲 Fixed in this version:

  • Time since execution metric not always being reported

🚀 Improved in this version:

  • Logging is more detailed, giving information about the extension activity

Full version history

🪲 Fixed in this version:

  • Missing import would cause datasource restart

Full version history

🪲 Fixed in this version:

  • Extension crashes if the task definition file doesn't declare a URI

Full version history

⚠️ Breaking changes:

  • As the extension has been redeveloped to remove the dependency on Powershell, the extension configuration options have also changed
  • This means existing configurations cannot be migrated and must be recreated
  • The manual data collection mode is no longer available

✨ New in this version:

  • All task events (from Windows Event Log) can be ingested in Dynatrace
  • Task frequency and timeout can be auto-detected for alerts
  • Logs ingested are displayed on the Task page
  • Problem details provide more detailed information about the error code

🚀 Improved in this version:

  • Tasks monitoring no longer relies on Powershell for gathering the data
  • Task information is read from the Windows event log

Full version history

🪲 Fixed in this version:

  • Failed status "1" (0x1) not handled by the extension

Full version history

No release notes

Dynatrace Hub
Hub HomeGet data into DynatraceBuild your own app
Log Management and AnalyticsKubernetesAI and LLM ObservabilityInfrastructure ObservabilitySoftware DeliveryApplication ObservabilityApplication SecurityDigital ExperienceBusiness Analytics
Filter
Type
Built and maintained by
Deployment model
SaaS
  • SaaS
  • Managed
Partner FinderBecome a partnerDynatrace Developer

All

0 Results filtered by:

We couldn't find any results

You can search all listings, or try a different spelling or keyword. Still nothing? Dynatrace makes it easy to create custom apps.

Find a partnerLearn to build apps