Click or drag to resize
Task Scheduler Managed Class Library

RunningTask Class

Provides the methods to get information from and control a running task.
Inheritance Hierarchy
SystemObject
  Microsoft.Win32.TaskSchedulerTask
    Microsoft.Win32.TaskSchedulerRunningTask

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.12.0
Syntax
C#
[XmlTypeAttribute(IncludeInSchema = false)]
public sealed class RunningTask : Task
Request Example View Source

The RunningTask type exposes the following members.

Properties
 NameDescription
Public propertyCurrentActionGets the name of the current action that the running task is performing.
Public propertyDefinitionGets the definition of the task.
(Inherited from Task)
Public propertyEnabledGets or sets a Boolean value that indicates if the registered task is enabled.
(Inherited from Task)
Public propertyEnginePIDGets the process ID for the engine (process) which is running the task.
Public propertyFolderGets an instance of the parent folder.
(Inherited from Task)
Public propertyInstanceGuidGets the GUID identifier for this instance of the task.
Public propertyIsActiveGets a value indicating whether this task instance is active.
(Inherited from Task)
Public propertyLastRunTimeGets the time the registered task was last run.
(Inherited from Task)
Public propertyCode exampleLastTaskResultGets the results that were returned the last time the registered task was run.
(Inherited from Task)
Public propertyNameGets the name of the registered task.
(Inherited from Task)
Public propertyNextRunTimeGets the time when the registered task is next scheduled to run.
(Inherited from Task)
Public propertyNumberOfMissedRunsGets the number of times the registered task has missed a scheduled run.
(Inherited from Task)
Public propertyPathGets the path to where the registered task is stored.
(Inherited from Task)
Public propertyReadOnly Gets a value indicating whether this task is read only. Only available if AllowReadOnlyTasks is true.
(Inherited from Task)
Public propertySecurityDescriptorObsolete.
Gets or sets the security descriptor for the task.
(Inherited from Task)
Public propertyStateGets the operational state of the running task.
(Overrides TaskState)
Public propertyTaskServiceGets or sets the TaskService that manages this task.
(Inherited from Task)
Public propertyXmlGets the XML-formatted registration information for the registered task.
(Inherited from Task)
Top
Methods
 NameDescription
Public methodCompareTo Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
(Inherited from Task)
Public methodDisposeReleases all resources used by this class.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodExportExports the task to the specified file in XML.
(Inherited from Task)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetAccessControl Gets a TaskSecurity object that encapsulates the specified type of access control list (ACL) entries for the task described by the current Task object.
(Inherited from Task)
Public methodGetAccessControl(AccessControlSections) Gets a TaskSecurity object that encapsulates the specified type of access control list (ACL) entries for the task described by the current Task object.
(Inherited from Task)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetInstancesGets all instances of the currently running registered task.
(Inherited from Task)
Public methodGetLastRegistrationTime Gets the last registration time, looking first at the Date value and then looking for the most recent registration event in the Event Log.
(Inherited from Task)
Public methodGetRunTimesGets the times that the registered task is scheduled to run during a specified time.
(Inherited from Task)
Public methodGetSecurityDescriptorSddlFormGets the security descriptor for the task. Not available to Task Scheduler 1.0.
(Inherited from Task)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodOnNotifyPropertyChangedCalled when a property has changed to notify any attached elements.
(Inherited from Task)
Public methodRefreshRefreshes all of the local instance variables of the task.
Public methodRegisterChanges Updates the task with any changes made to the Definition by calling RegisterTaskDefinition(String, TaskDefinition) from the currently registered folder using the currently registered name.
(Inherited from Task)
Public methodCode exampleRunRuns the registered task immediately.
(Inherited from Task)
Public methodCode exampleRunExRuns the registered task immediately using specified flags and a session identifier.
(Inherited from Task)
Public methodCode exampleSetAccessControl Applies access control list (ACL) entries described by a TaskSecurity object to the file described by the current Task object.
(Inherited from Task)
Public methodSetSecurityDescriptorSddlFormSets the security descriptor for the task. Not available to Task Scheduler 1.0.
(Inherited from Task)
Public methodShowEditorDynamically tries to load the assembly for the editor and displays it as editable for this task.
(Inherited from Task)
Public methodShowPropertyPageShows the property page for the task (v1.0 only).
(Inherited from Task)
Public methodStopStops the registered task immediately.
(Inherited from Task)
Public methodToStringReturns a String that represents this instance.
(Inherited from Task)
Top
Events
 NameDescription
Public eventPropertyChangedOccurs when a property value changes.
(Inherited from Task)
Top
See Also