Click or drag to resize
Task Scheduler Managed Class Library

TaskService Methods

The TaskService type exposes the following members.

Methods
  NameDescription
Public methodAddAutomaticMaintenanceTask
Adds or updates an Automatic Maintenance Task on the connected machine.
Public methodCode exampleAddTask(String, Trigger, Action, String, String, TaskLogonType, String)
Creates a new task, registers the task, and returns the instance.
Public methodCode exampleAddTask(String, QuickTriggerType, String, String, String, String, TaskLogonType, String)
Creates a new task, registers the task, and returns the instance.
Public methodBeginInit
Signals the object that initialization is starting.
Public methodStatic memberCreateFromToken
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.
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose
Releases all resources used by the Component.
(Inherited from Component.)
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the Component and optionally releases the managed resources.
(Overrides ComponentDispose(Boolean).)
Public methodEndInit
Signals the object that initialization is complete.
Public methodEquals
Determines whether the specified Object, is equal to this instance.
(Overrides ObjectEquals(Object).)
Public methodExecute
Initial call for a Fluent model of creating a task.
Protected methodFinalize
Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.
(Inherited from Component.)
Public methodFindAllTasks(PredicateTask, Boolean)
Finds all tasks matching a name or standard wildcards.
Public methodFindAllTasks(Regex, Boolean)
Finds all tasks matching a name or standard wildcards.
Public methodFindTask
Finds a task given a name and standard wildcards.
Public methodStatic memberCode exampleGetDllResourceString
Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file.
Public methodGetEventLog
Gets the event log for this TaskService instance.
Public methodGetFolder
Gets the path to a folder of registered tasks.
Public methodGetHashCode
Returns a hash code for this instance.
(Overrides ObjectGetHashCode.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetRunningTasks
Gets a collection of running tasks.
Protected methodGetService
Returns an object that represents a service provided by the Component or by its Container.
(Inherited from Component.)
Public methodGetTask
Gets the task with the specified path.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Public methodNewTask
Returns an empty task definition object to be filled in with settings and properties and then registered using the RegisterTaskDefinition(String, TaskDefinition) method.
Public methodNewTaskFromFile
Returns a TaskDefinition populated with the properties defined in an XML file.
Public methodStatic memberRunComHandlerAction
Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the ITaskHandler interface.
Public methodStatic memberRunComHandlerActionAsync
Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the ITaskHandler interface.
Public methodStartSystemTaskSchedulerManager
Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode.
Public methodToString
Returns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component.)
Top
Extension Methods
  NameDescription
Public Extension MethodGetFilteredAvailableActions
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.)
Public Extension MethodGetFilteredAvailableTriggers
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.)
Top
See Also