The Downloads page contains a full help file which documents every class in detail.
class represents the machine specific instance of the system task scheduler. It provides access to information about the service, access folders (2.0 only), and can quickly add or retrieve a task. If
you only need to use the library for very intermitant periods, wrap the TaskService instantiation in a
statement to easily disconnect at the end of your use. However, if you plan on using the connection to the Task Scheduler repeatedly, use an assembly level field to store the TaskService instance as connecting and disconnecting is an expensive
Tasks are accessed and can be enumerated through a TaskFolder
. For systems supporting only the 1.0 library, there is only the root folder. The 2.0 library supports a hierarchal structure similar to a file system. The
property exposes a TaskCollection
instance which can enumerate tasks and provides an indexer which allows access to individual tasks by name. The
class also has methods that allow for the creation/registration and deletion of tasks and subfolders by name.
A task is represented by a Task
instance. The Task class provides information about tasks state and history and exposes the task's
exposes all of the properties of a task which allow you to define how and what will run when the task is triggered. A task must have at least one action and one trigger defined.
Each task has a list of triggers that determine when the task will be run. These are accessed through the
property of a task definition which exposes a
provides an indexer which allows access to individual triggers by their position in the list. The
class also has methods that allow for the addition and removal of triggers.
implements the IList interface so you can also enumerate all tasks using the foreach construct.
class is an abstract class that forms the foundation of the different types of triggers that can be specified for a task. There are 10 different specializations that provide different ways to specify the
time a task will run. Not all specializations work with the 1.0 library. See the help file for details about each of the trigger classes. The
has some examples of how to setup each kind of trigger.
class is an abstract class that is the foundation for four different actions. On 1.0, only the
specialization is available unless the PowerShellConversion option is enabled (see
for more information). These actions determine what the service will do when a trigger is fired. The
has some examples of how to setup each kind of action.