Click or drag to resize
Task Scheduler Managed Class Library

Microsoft.Win32.TaskScheduler Namespace

The Microsoft.Win32.TaskScheduler namespace provides a wrapper for the 1.0 and 2.0 versions of Task Scheduler found in all Microsoft operating systems post Windows 98. It will automatically choose the most recent version of the library found on the host system. The namespace includes classes for direct manipulation of the Task Scheduler as well as UI items to allow users to manipulate tasks.
Classes
 ClassDescription
Public classAction Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the AddNew(TaskActionType) method.
Public classActionCollectionCollection that contains the actions that are performed by the task.
Public classActionEditDialogAn editor that handles all Task actions.
Public classCode exampleBootTriggerRepresents a trigger that starts a task when the system is booted.
Public classCode exampleComHandlerAction Represents an action that fires a handler. Only available on Task Scheduler 2.0.
Note  Note
Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later.
Public classComObjectSelectionDialogDialog that will enumerate and display a list of COM objects and allow for a single selection.
Public classCorrelatedTaskEvent Historical event information for a task.
Public classCorrelatedTaskEventEnumerator An enumerator over a task's history of events.
Public classCorrelatedTaskEventLog Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems.
Public classCustomComboBoxCustomComboBox is an extension of ComboBox which provides drop-down customization.
Public classCustomTrigger Represents a custom trigger. This class is based on undocumented features and may change.
Note  Note
This type of trigger is only available for reading custom triggers. It cannot be used to create custom triggers.
Public classCode exampleDailyTrigger Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every other day, every third day, and so on.
Public classDropDownCheckListA check list in a drop down combo box.
Public classDropDownCheckTree A check list in a drop down combo box.
Public classCode exampleEmailAction Represents an action that sends an e-mail.
Note  Note
Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later.
Caution note  Caution
This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the PowerShellConversion property is set to All. To disable this conversion, set the value to Never.
Public classEventActionFilterEditorDialog that enables editing of event queries, specifically for creating filters.
Public classCode exampleEventTrigger Represents a trigger that starts a task when a system event occurs.
Note  Note
Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later.
Public classEventViewerDialog Dialog allowing the viewing of a task event.
Public classCode exampleExecActionRepresents an action that executes a command-line operation.
Public classFullDateTimePickerA single control that can represent a full date and time.
Public classIdleSettings Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions.
Public classCode exampleIdleTrigger Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions.
Public classListColumnEditor Dialog allowing the selections of columns for a list.
Public classListControlItemAn item in a ListControl.
Public classCode exampleLogonTrigger Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are enumerated and any tasks registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0.
Public classMaintenanceSettingsSpecifies the task settings the Task scheduler will use to start task during Automatic maintenance.
Public classMonthlyDOWTrigger Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May through October.
Public classMonthlyTrigger Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months.
Public classNamedValueCollection Contains a collection of name-value pairs.
Public classNameValuePair Pair of name and value.
Public classNetworkSettingsProvides the settings that the Task Scheduler service uses to obtain a network profile.
Public classNotSupportedPriorToException Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified.
Public classNotV1SupportedException Thrown when the calling method is not supported by Task Scheduler 1.0.
Public classNotV2SupportedException Thrown when the calling method is not supported by Task Scheduler 2.0.
Public classCode exampleRegistrationTrigger Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0.
Note  Note
Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later.
Public classCode exampleRepetitionPatternDefines how often the task is run and how long the repetition pattern is repeated after the task is started.
Public classResourceReferenceValue Some string values of TaskDefinition properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings.
Public classRunningTaskProvides the methods to get information from and control a running task.
Public classRunningTaskCollection Collection of running tasks in a TaskService. This class has no public constructor and can only be accessed via the properties and functions within TaskService.
Public classCode exampleSessionStateChangeTrigger Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications.
Note  Note
Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later.
Public classCode exampleShowMessageAction Represents an action that shows a message box when a task is activated.
Note  Note
Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later.
Caution note  Caution
This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the PowerShellConversion property is set to All. To disable this conversion, set the value to Never.
Public classSnapshotItemAbstract class representing a secured item for storage in a TaskSchedulerSnapshot.
Public classTask Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to register the task, and the properties that describe the task.
Public classTaskAccessRule Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited.
Public classTaskAuditRule Represents a set of access rights to be audited for a user or group. This class cannot be inherited.
Public classTaskBrowserDialog A dialog for selecting tasks or task folders.
Public classCode exampleTaskCollection Contains all the tasks that are registered within a TaskFolder. This class has no public constructor and can only be accessed via the properties and functions within TaskFolder.
Public classTaskCompatibilityEntryContains information about the compatibility of the current configuration with a specified version.
Public classTaskDefinitionDefines all the components of a task, such as the task settings, triggers, actions, and registration information.
Public classTaskEditDialogDialog that allows tasks to be edited
Public classTaskEnumGlobalizer Functions to provide localized strings for enumerated types and values.
Public classTaskEvent Historical event information for a task. This class wraps and extends the EventRecord class.
Public classTaskEventEventDataValues Get indexer class for EventLogRecord data values.
Public classTaskEventArgs Information about the task event.
Public classTaskEventEnumerator An enumerator over a task's history of events.
Public classCode exampleTaskEventLog Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems.
Public classCode exampleTaskEventWatcher Watches system events related to tasks and issues a EventRecorded event when the filtered conditions are met.
Note  Note
Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later.
Public classTaskEventWatcherEventFilter Holds filter information for a TaskEventWatcher.
Public classTaskFolder Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder.
Public classTaskFolderCollectionProvides information and control for a collection of folders that contain tasks.
Public classTaskFolderSnapshotRepresents a TaskFolder instance and captures its name and security.
Public classTaskHistoryControl Split-panel that displays a list of all events associated with a task with a hidable detail pane.
Public classTaskListView Displays a TaskCollection in a ListView control. Mimics list in MMC.
Public classTaskListViewTaskSelectedEventArgs Event args for when a task is selected.
Public classTaskOptionsEditorDialog that allows tasks to be edited
Public classCode exampleTaskPrincipal Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal.
Public classTaskPrincipalPrivileges List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security context for the tasks that are associated with the principal.
Public classTaskPrincipalPrivilegesTaskPrincipalPrivilegesEnumeratorEnumerates the privileges set for a principal under version 1.3 of the Task Scheduler.
Public classTaskPropertiesControlControl which allows for the editing of all properties of a TaskDefinition.
Public classTaskPropertiesControlComponentErrorEventArgsError thrown within the component.
Public classTaskRegistrationInfo Provides the administrative information that can be used to describe the task. This information includes details such as a description of the task, the author of the task, the date the task is registered, and the security descriptor of the task.
Public classTaskRunTimesControlControl that will display the run times for a provided task.
Public classTaskRunTimesDialog Dialog that will display the run times for a provided task.
Public classTaskSchedulerSnapshot Represents all the information about the tasks and folders from a TaskService instance that can be used to reconstitute tasks and folders on the same or different systems.
Note  Note
This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to dependencies on threading and compressed (zip) files.
Public classTaskSchedulerWizard A wizard that walks the user through the creation of a simple task.
Public classTaskSecurity Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited.
Public classTaskServiceProvides access to the Task Scheduler service for managing registered tasks.
Public classTaskServiceConnectDialog Dialog box to set the properties of a TaskService.
Public classTaskServiceExtensionsExtension methods for TaskService.
Public classTaskServiceVersion Known versions of the native Task Scheduler library. This can be used as a decoder for the HighestSupportedVersion and LibraryVersion values.
Public classTaskSettingsProvides the settings that the Task Scheduler service uses to perform the task.
Public classTaskSnapshotRepresents a Task instance and captures its details.
Public classTextValueItemTA generic text/value class.
Public classCode exampleTimeTriggerRepresents a trigger that starts a task at a specific date and time.
Public classTrigger Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the AddTTrigger(TTrigger) or the AddNew(TaskTriggerType) method.
Public classTriggerCollectionProvides the methods that are used to add to, remove from, and get the triggers of a task.
Public classTriggerEditDialogAn editor that handles all Task triggers.
Public classTSNotSupportedException Abstract class for throwing a method specific exception.
Public classCode exampleWeeklyTrigger Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of the week every week or every other week.
Public classWildcard Represents a wildcard running on the System.Text.RegularExpressions engine.
Structures
 StructureDescription
Public structureTaskServiceConnectionToken Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing information about a TaskService between threads.
Interfaces
 InterfaceDescription
Public interfaceICalendarTriggerInterface that categorizes the trigger as a calendar trigger.
Public interfaceITaskDefinitionEditor Represents a UI element that can edit task settings
Public interfaceITaskEditor Represents a UI element that can edit tasks and their settings
Public interfaceITaskEditorUIElement Represents a UI element that can must be forced to refresh its state
Public interfaceITaskHandler Defines the methods that are called by the Task Scheduler service to manage a COM handler.
Public interfaceITaskHandlerStatus Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler.
Public interfaceITriggerDelayInterface for triggers that support a delay.
Public interfaceITriggerUserIdInterface for triggers that support a user identifier.
Delegates
 DelegateDescription
Public delegateTaskServiceComHandlerUpdateDelegate for methods that support update calls during COM handler execution.
Enumerations
 EnumerationDescription
Public enumerationAvailableActionsDefines the type of actions available to a user interface element.
Public enumerationAvailableTaskTabsFlags representing tabs that can be visible on a TaskPropertiesControl.
Public enumerationAvailableTriggersTrigger types that can be made available to UI elements.
Public enumerationComObjectSelectionDialogSupportedServersCOM server types that can be displayed by a ComObjectSelectionDialog.
Public enumerationCorrelatedTaskEventStatus Status of correlated task events
Public enumerationCorrelatedTaskEventTriggerType Type of trigger that initiated the task execution.
Public enumerationCustomComboBoxSizeMode Sizing mode for the CustomComboBox drop-down area.
Public enumerationDaysOfTheWeekValues for days of the week (Monday, Tuesday, etc.)
Public enumerationFullDateTimePickerFieldConversionUtcCheckBehaviorBehavior of producing value when Utc check is checked
Public enumerationFullDateTimePickerTimeFormatDetermines the format of the FullDateTimePicker control.
Public enumerationMonthsOfTheYearValues for months of the year (January, February, etc.)
Public enumerationPowerShellActionPlatformOptionOptions for when to convert actions to PowerShell equivalents.
Public enumerationQuickTriggerType Quick simple trigger types for the AddTask(String, Trigger, Action, String, String, TaskLogonType, String) method.
Public enumerationStandardTaskEventId Changes to tasks and the engine that cause events.
Public enumerationTaskActionTypeDefines the type of actions a task can perform.
Public enumerationTaskCompatibilityDefines what versions of Task Scheduler or the AT command that the task is compatible with.
Public enumerationTaskCreationDefines how the Task Scheduler service creates, updates, or disables the task.
Public enumerationTaskInstancesPolicyDefines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task.
Public enumerationTaskLogonTypeDefines what logon technique is required to run a task.
Public enumerationTaskPrincipalPrivilegeDefines which privileges must be required for a secured task.
Public enumerationTaskProcessTokenSidType Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of process SID in the IPrincipal2 interface.
Public enumerationTaskRights Specifies the access control rights that can be applied to Task Scheduler tasks.
Public enumerationTaskRunFlagsDefines how a task is run.
Public enumerationTaskRunLevelDefines LUA elevation flags that specify with what privilege level the task will be run.
Public enumerationTaskSchedulerWizardAvailableWizardActions Flags to indicate which actions are available in the TaskSchedulerWizard.
Public enumerationTaskSchedulerWizardAvailableWizardPages Flags to indicate which pages are visible in the TaskSchedulerWizard.
Public enumerationTaskSchedulerWizardAvailableWizardTriggers Flags to indicate which triggers are available in the TaskSchedulerWizard.
Public enumerationTaskSessionStateChangeType Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify the type of state change in the SessionStateChangeTrigger.
Public enumerationTaskSetSecurityOptionsOptions for use when calling the SetSecurityDescriptorSddlForm methods.
Public enumerationTaskStateDefines the different states that a registered task can be in.
Public enumerationTaskTriggerTypeDefines the type of triggers that can be used by tasks.
Public enumerationWhichWeekValues for week of month (first, second, ..., last)