Task |
[SerializableAttribute] public sealed class TaskService : Component, ISupportInitialize, ISerializable
The TaskService type exposes the following members.
| Name | Description | |
|---|---|---|
| TaskService | Creates a new instance of a TaskService connecting to the local machine as the current user. | |
| TaskService(String, String, String, SecureString, Boolean) | Initializes a new instance of the TaskService class. | |
| TaskService(String, String, String, String, Boolean) | Initializes a new instance of the TaskService class. |
| Name | Description | |
|---|---|---|
| AllowReadOnlyTasks | Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. | |
| AllTasks | Gets a IEnumeratorT which enumerates all the tasks in all folders. | |
| CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Overrides ComponentCanRaiseEvents) | |
| Connected | Gets a Boolean value that indicates if you are connected to the Task Scheduler service. | |
| ConnectedDomain | Obsolete. Gets the name of the domain to which the TargetServer computer is connected. | |
| ConnectedUser | Obsolete. Gets the name of the user that is connected to the Task Scheduler service. | |
| Container | Gets the IContainer that contains the Component. (Inherited from Component) | |
| DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component) | |
| Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component) | |
| HighestSupportedVersion | Gets the highest version of Task Scheduler that a computer supports. | |
| Instance | Gets a local instance of the TaskService using the current user's credentials. | |
| LibraryVersion | Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any compatibility level higher than this version. | |
| RootFolder | Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. | |
| Site | Gets or sets the ISite of the Component. (Inherited from Component) | |
| TargetServer | Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. | |
| Token | Gets the connection token for this TaskService instance. This token is thread safe and can be used to create new TaskService instances on other threads using the CreateFromToken(TaskServiceConnectionToken) static method. | |
| UserAccountDomain | Gets or sets the user account domain to be used when connecting to the TargetServer. | |
| UserName | Gets or sets the user name to be used when connecting to the TargetServer. | |
| UserPassword | Gets or sets the user password to be used when connecting to the TargetServer. |
| Name | Description | |
|---|---|---|
| AddAutomaticMaintenanceTask | Adds or updates an Automatic Maintenance Task on the connected machine. | |
| AddTask(String, Trigger, Action, String, String, TaskLogonType, String) | Creates a new task, registers the task, and returns the instance. | |
| AddTask(String, QuickTriggerType, String, String, String, String, TaskLogonType, String) | Creates a new task, registers the task, and returns the instance. | |
| BeginInit | Signals the object that initialization is starting. | |
| CreateFromToken | Creates a new TaskService instance from a token. Given that a TaskService instance is thread specific, this is the preferred method for multi-thread creation or asynchronous method parameters. | |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject) | |
| Dispose | Releases all resources used by the Component. (Inherited from Component) | |
| Dispose(Boolean) |
Releases the unmanaged resources used by the Component and optionally releases the managed resources.
(Overrides ComponentDispose(Boolean)) | |
| EndInit | Signals the object that initialization is complete. | |
| Equals | Determines whether the specified Object, is equal to this instance. (Overrides ObjectEquals(Object)) | |
| Execute | Initial call for a Fluent model of creating a task. | |
| Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component) | |
| FindAllTasks(PredicateTask, Boolean) | Finds all tasks matching a name or standard wildcards. | |
| FindAllTasks(Regex, Boolean) | Finds all tasks matching a name or standard wildcards. | |
| FindTask | Finds a task given a name and standard wildcards. | |
| GetDllResourceString | Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. | |
| GetEventLog | Gets the event log for this TaskService instance. | |
| GetFolder | Gets the path to a folder of registered tasks. | |
| GetHashCode | Returns a hash code for this instance. (Overrides ObjectGetHashCode) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject) | |
| GetRunningTasks | Gets a collection of running tasks. | |
| GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component) | |
| GetTask | Gets the task with the specified path. | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject) | |
| NewTask | Returns an empty task definition object to be filled in with settings and properties and then registered using the RegisterTaskDefinition(String, TaskDefinition) method. | |
| NewTaskFromFile | Returns a TaskDefinition populated with the properties defined in an XML file. | |
| RunComHandlerAction | Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the ITaskHandler interface. | |
| RunComHandlerActionAsync | Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the ITaskHandler interface. | |
| SetUserSecurePassword | Sets the user password as a secure string to be used when connecting to the TargetServer. | |
| StartSystemTaskSchedulerManager | Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. | |
| ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component) |
| Name | Description | |
|---|---|---|
| Disposed | Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component) | |
| ServiceConnected | Occurs when the Task Scheduler is connected to the local or remote target. | |
| ServiceDisconnected | Occurs when the Task Scheduler is disconnected from the local or remote target. |
| Name | Description | |
|---|---|---|
| GetFilteredAvailableActions | Filtered the supplied available actions based on this version of the Task Scheduler and options that could be set on the TaskDefinition. (Defined by TaskServiceExtensions) | |
| GetFilteredAvailableTriggers | Filtered the supplied available triggers based on this version of the Task Scheduler and options that could be set on the TaskDefinition. (Defined by TaskServiceExtensions) |