Microsoft.Win32.TaskScheduler
Provides access to the Task Scheduler service for managing registered tasks.
Creates a new instance of a TaskService connecting to the local machine as the current user.
Initializes a new instance of the class.
The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer.
The user name that is used during the connection to the computer. If the user is not specified, then the current token is used.
The domain of the user specified in the parameter.
The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used.
If set to true force Task Scheduler 1.0 compatibility.
Creates a new task, registers the taks, and returns the instance.
The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
The to determine when to run the task.
The to determine what happens when the task is triggered.
The user credentials used to register the task.
The password for the userId used to register the task.
A value that defines what logon technique is used to run the registered task.
A instance of the registered task.
Finds a task given a name and standard wildcards.
The task name. This can include the wildcards * or ?.
if set to true search all sub folders.
A if one matches , otherwise NULL.
Gets the path to a folder of registered tasks.
The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
instance for the requested folder.
Requested folder was not found.
Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0.
Gets a collection of running tasks.
True to include hidden tasks.
instance with the list of running tasks.
Gets the task with the specified path.
The task path.
The task.
Signals the object that initialization is starting.
Signals the object that initialization is complete.
Returns an empty task definition object to be filled in with settings and properties and then registered using the method.
instance for setting properties.
Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode.
Releases the unmanaged resources used by the and optionally releases the managed resources.
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Connects this instance of the class to a running Task Scheduler.
Finds the task in folder.
The folder.
The wildcard expression to compare task names with.
if set to true recurse folders.
A if one matches , otherwise NULL.
Gets a Boolean value that indicates if you are connected to the Task Scheduler service.
Gets the name of the domain to which the computer is connected.
Gets the name of the user that is connected to the Task Scheduler service.
Gets the highest version of Task Scheduler that a computer supports.
Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder.
Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to.
Gets or sets the user account domain to be used when connecting to the .
The user account domain.
Gets or sets the user name to be used when connecting to the .
The user name.
Gets or sets the user password to be used when connecting to the .
The user password.
Gets a value indicating whether the component can raise an event.
true if the component can raise events; otherwise, false. The default is true.
Contains a collection of name-value pairs.
Copies current to another.
The destination collection.
Releases all resources used by this class.
Adds a name-value pair to the collection.
The name associated with a value in a name-value pair.
The value associated with a name in a name-value pair.
Removes a selected name-value pair from the collection.
Index of the pair to remove.
Clears the entire collection of name-value pairs.
Gets the collection enumerator for the name-value collection.
An for the collection.
Gets the number of items in the collection.
Gets the value of the item at the specified index.
The index of the item being requested.
The value of the name-value pair at the specified index.
Gets the value of the item with the specified key.
Key to get the value for.
Value for the key, or null if not found.
Defines what versions of Task Scheduler or the AT command that the task is compatible with.
The task is compatible with the AT command.
The task is compatible with Task Scheduler 1.0.
The task is compatible with Task Scheduler 2.0.
Defines how the Task Scheduler service creates, updates, or disables the task.
The Task Scheduler service registers the task as a new task.
The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. Equivalent to Create | Update.
The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, see Enabled Property of TaskSettings and Enabled Property of RegisteredTask.
The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task Scheduler service does not add the ACE for the new context principal and does not remove the ACE from the old context principal.
The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration triggers, the task will not execute when it is registered unless a time-based trigger causes it to execute on registration.
The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger is updated, the task will execute after the update occurs.
The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant cannot be combined with the Create, Update, or CreateOrUpdate values.
Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task.
Starts new instance while an existing instance is running.
Starts a new instance of the task after all other instances of the task are complete.
Does not start a new instance if an existing instance of the task is running.
Stops an existing instance of the task before it starts a new instance.
Defines what logon technique is required to run a task.
The logon method is not specified. Used for non-NT credentials.
Use a password for logging on the user. The password must be supplied at registration time.
Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is used, no password is stored by the system and there is no access to either the network or to encrypted files.
User must already be logged on. The task will be run only in an existing interactive session.
Group activation. The groupId field specifies the group.
Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task.
First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. The password must be specified when a task is registered. This flag is not recommended for new tasks because it is less reliable than Password.
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.
No changes will be made to the process token groups list.
A task SID that is derived from the task name will be added to the process token groups list, and the token default discretionary access control list (DACL) will be modified to allow only the task SID and local system full control and the account SID read control.
A Task Scheduler will apply default settings to the task process.
Defines how a task is run.
The task is run as the user who is calling the Run method.
The task is run regardless of constraints such as "do not run on batteries" or "run only if idle".
The task is run with all flags ignored.
The task is run using a terminal server session identifier.
The task is run using a security identifier.
Defines LUA elevation flags that specify with what privilege level the task will be run.
Tasks will be run with the least privileges.
Tasks will be run with the highest privileges.
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.
Terminal Server console connection state change. For example, when you connect to a user session on the local computer by switching users on the computer.
Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by switching users on the computer.
Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop Connection program from a remote computer.
Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the Remote Desktop Connection program from a remote computer.
Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked.
Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked.
Defines the different states that a registered task can be in.
The state of the task is unknown.
The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled.
Instances of the task are queued.
The task is ready to be executed, but no instances are queued or running.
One or more instances of the task is running.
Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions.
Releases all resources used by this class.
Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run.
Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once.
Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before the task is completed.
Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur.
Provides the settings that the Task Scheduler service uses to obtain a network profile.
Releases all resources used by this class.
Gets or sets a GUID value that identifies a network profile.
Gets or sets the name of a network profile. The name is used for display purposes.
Provides the methods to get information from and control a running task.
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.
Releases all resources used by this class.
Gets the times that the registered task is scheduled to run during a specified time.
The starting time for the query.
The ending time for the query.
The requested number of runs. A value of 0 will return all times requested.
The scheduled times that the task will run.
Gets the security descriptor for the task. Not available to Task Scheduler 1.0.
Section(s) of the security descriptor to return.
The security descriptor for the task.
Updates the task with any changes made to the by calling from the currently registered folder using the currently registered name.
Thrown if task was previously registered with a password.
Runs the registered task immediately.
The parameters used as values in the task actions.
A instance that defines the new instance of the task.
Runs the registered task immediately using specified flags and a session identifier.
Defines how the task is run.
The terminal server session in which you want to start the task.
The user for which the task runs.
The parameters used as values in the task actions.
A instance that defines the new instance of the task.
Sets the security descriptor for the task. Not available to Task Scheduler 1.0.
The security descriptor for the task.
Section(s) of the security descriptor to set.
Dynamically tries to load the assembly for the editor and displays it as editable for this task.
true if editor returns with Ok response; false otherwise.
The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll or in the GAC.
Shows the property page for the task (v1.0 only).
Stops the registered task immediately.
Returns a that represents this instance.
A that represents this instance.
Gets the definition of the task.
Gets or sets a Boolean value that indicates if the registered task is enabled.
Gets the time the registered task was last run.
Gets the results that were returned the last time the registered task was run.
Gets the name of the registered task.
Gets the time when the registered task is next scheduled to run.
Gets the number of times the registered task has missed a scheduled run.
Gets the path to where the registered task is stored.
Gets or sets the security descriptor for the task.
The security descriptor.
Gets the operational state of the registered task.
Gets or sets the that manages this task.
The task service.
Gets the XML-formatted registration information for the registered task. Not available with Task Scheduler 1.0.
Releases all resources used by this class.
Refreshes all of the local instance variables of the task.
Gets the name of the current action that the running task is performing.
Gets the process ID for the engine (process) which is running the task.
Gets the GUID identifier for this instance of the task.
Defines all the components of a task, such as the task settings, triggers, actions, and registration information.
Releases all resources used by this class.
Gets a collection of actions that are performed by the task.
Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to extend the task format.
Gets the principal for the task that provides the security credentials for the task.
Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and the date the task is registered.
Gets the settings that define how the Task Scheduler service performs the task.
Gets a collection of triggers that are used to start a task.
Gets or sets the XML-formatted definition of the task. Not available on Task Scheduler 1.0.
Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal.
Releases all resources used by this class.
Returns a that represents this instance.
A that represents this instance.
Gets or sets the name of the principal that is displayed in the Task Scheduler UI.
Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to something other than a null or empty string, will set the property to NULL and will set the property to TaskLogonType.Group;
Gets or sets the identifier of the principal.
Gets or sets the security logon method that is required to run the tasks that are associated with the principal.
Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal.
Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other than a null or empty string, will set the property to NULL;
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.
Releases all resources used by this class.
Gets or sets the author of the task.
Gets or sets the date and time when the task is registered.
Gets or sets the description of the task.
Gets or sets any additional documentation for the task.
Gets or sets the security descriptor of the task.
The security descriptor.
Gets or sets the security descriptor of the task.
Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user.
Gets or sets the URI of the task.
Gets or sets the version number of the task.
Gets or sets an XML-formatted version of the registration information for the task. Not available for Task Scheduler 1.0.
Provides the settings that the Task Scheduler service uses to perform the task.
Releases all resources used by this class.
Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu.
Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess.
Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with.
Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires.
For Task Scheduler 1.0, this property will return a TimeSpan of 1 second if the task is set to delete when done. For either version, TimeSpan.Zero will indicate that the task should not be deleted.
Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power.
Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE.
Gets or sets the amount of time that is allowed to complete the task.
Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default.
Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state.
Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task.
Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of ITaskSettings is true and a network propfile is specified in the NetworkSettings property, then the task will run only if the specified network profile is available.
Gets or sets the priority level of the task.
Gets or sets the number of times that the Task Scheduler will attempt to restart the task.
Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task.
Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition.
Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only)
Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available.
Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed.
Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power.
Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task.
Gets or sets an XML-formatted definition of the task settings.
Provides the methods that are used to add to, remove from, and get the triggers of a task.
Releases all resources used by this class.
Gets the collection enumerator for this collection.
The for this collection.
Add an unbound to the task.
derivative to add to the task.
Bound trigger.
Add a new trigger to the collections of triggers for the task.
The type of trigger to create.
A instance of the specified type.
Clears all triggers from the task.
Inserts an trigger at the specified index.
The zero-based index at which trigger should be inserted.
The trigger to insert into the list.
Removes the trigger at a specified index.
Index of trigger to remove.
Index out of range.
Returns a that represents the triggers in this collection.
A that represents the triggers in this collection.
Gets the number of triggers in the collection.
Gets a specified trigger from the collection.
The index of the trigger to be retrieved.
Specialized instance.
Releases all resources used by this class.
Releases all resources used by this class.
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.
Releases all resources used by this class.
Creates a folder for related tasks. Not available to Task Scheduler 1.0.
The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
A instance that represents the new subfolder.
Creates a folder for related tasks. Not available to Task Scheduler 1.0.
The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
The security descriptor associated with the folder.
A instance that represents the new subfolder.
Creates a folder for related tasks. Not available to Task Scheduler 1.0.
The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
The security descriptor associated with the folder.
A instance that represents the new subfolder.
Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0.
The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
Gets a collection of all the tasks in the folder whose name matches the optional .
The optional name filter expression.
Collection of all matching tasks.
Deletes a task from the folder.
The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
Registers (creates) a new task in the folder using XML to define the task. Not available for Task Scheduler 1.0.
The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
An XML-formatted definition of the task.
A union of flags.
The user credentials used to register the task.
The password for the userId used to register the task.
A value that defines what logon technique is used to run the registered task.
The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task.
A instance that represents the new task.
Registers (creates) a task in a specified location using a instance to define a task.
The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
The of the registered task.
A instance that represents the new task.
Registers (creates) a task in a specified location using a instance to define a task.
The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.
The of the registered task.
A union of flags.
The user credentials used to register the task.
The password for the userId used to register the task.
A value that defines what logon technique is used to run the registered task.
The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task.
A instance that represents the new task.
Gets the security descriptor for the folder. Not available to Task Scheduler 1.0.
Section(s) of the security descriptor to return.
The security descriptor for the folder.
Gets the security descriptor for the folder. Not available to Task Scheduler 1.0.
Section(s) of the security descriptor to return.
The security descriptor for the folder.
Sets the security descriptor for the folder. Not available to Task Scheduler 1.0.
The security descriptor for the folder.
Section(s) of the security descriptor to set.
Sets the security descriptor for the folder. Not available to Task Scheduler 1.0.
The security descriptor for the folder.
Section(s) of the security descriptor to set.
Returns a that represents this instance.
A that represents this instance.
Gets the name that is used to identify the folder that contains a task.
Gets the path to where the folder is stored.
Gets or sets the security descriptor of the task.
The security descriptor.
Gets all the subfolders in the folder.
Gets or sets the that manages this task.
The task service.
Gets a collection of all the tasks in the folder.
Provides information and control for a collection of folders that contain tasks.
Releases all resources used by this class.
Copies the elements of the ICollection to an Array, starting at a particular Array index.
The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing.
The zero-based index in array at which copying begins.
Gets a list of items in a collection.
Enumerated list of items in the collection.
Gets the specified folder from the collection.
The index of the folder to be retrieved.
A TaskFolder instance that represents the requested folder.
Gets the specified folder from the collection.
The path of the folder to be retrieved.
A TaskFolder instance that represents the requested folder.
Gets the number of items in the collection.
Releases all resources used by this class.
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to Call a COM object.
Looks up a localized string similar to Start a program.
Looks up a localized string similar to Send an e-mail.
Looks up a localized string similar to Display a message.
Looks up a localized string similar to {0}.
Looks up a localized string similar to every day.
Looks up a localized string similar to Friday.
Looks up a localized string similar to Monday.
Looks up a localized string similar to Saturday.
Looks up a localized string similar to Sunday.
Looks up a localized string similar to Thursday.
Looks up a localized string similar to Tuesday.
Looks up a localized string similar to Wednesday.
Looks up a localized string similar to {1} {0}.
Looks up a localized string similar to ..
Looks up a localized string similar to {0} {1}.
Looks up a localized string similar to , .
Looks up a localized string similar to every month.
Looks up a localized string similar to April.
Looks up a localized string similar to August.
Looks up a localized string similar to December.
Looks up a localized string similar to February.
Looks up a localized string similar to January.
Looks up a localized string similar to July.
Looks up a localized string similar to June.
Looks up a localized string similar to March.
Looks up a localized string similar to May.
Looks up a localized string similar to November.
Looks up a localized string similar to October.
Looks up a localized string similar to September.
Looks up a localized string similar to Multiple actions defined.
Looks up a localized string similar to Multiple triggers defined.
Looks up a localized string similar to {0}.
Looks up a localized string similar to Author.
Looks up a localized string similar to Disabled.
Looks up a localized string similar to Queued.
Looks up a localized string similar to Ready.
Looks up a localized string similar to Running.
Looks up a localized string similar to Unknown.
Looks up a localized string similar to any user.
Looks up a localized string similar to After triggered, repeat every.
Looks up a localized string similar to indefinitely.
Looks up a localized string similar to for a duration of.
Looks up a localized string similar to Trigger expires at.
Looks up a localized string similar to At system startup.
Looks up a localized string similar to At {0:t} every day.
Looks up a localized string similar to At {0:t} every {1} days.
Looks up a localized string similar to Custom event filter.
Looks up a localized string similar to On event - Log: {0}.
Looks up a localized string similar to , Source: {0}.
Looks up a localized string similar to , EventID: {0}.
Looks up a localized string similar to When computer is idle.
Looks up a localized string similar to At log on of {0}.
Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}.
Looks up a localized string similar to At {0:t} on the {1} {2:f} each {3}, starting {0:d}.
Looks up a localized string similar to When the task is created or modified.
Looks up a localized string similar to On local connection to {0}..
Looks up a localized string similar to On local disconnect from {0}..
Looks up a localized string similar to On remote connection to {0}..
Looks up a localized string similar to On remote disconnect from {0}..
Looks up a localized string similar to On workstation lock of {0}..
Looks up a localized string similar to On workstation unlock of {0}..
Looks up a localized string similar to user session of {0}.
Looks up a localized string similar to At {0:t} on {0:d}.
Looks up a localized string similar to At startup.
Looks up a localized string similar to Daily.
Looks up a localized string similar to On an event.
Looks up a localized string similar to On idle.
Looks up a localized string similar to At log on.
Looks up a localized string similar to Monthly.
Looks up a localized string similar to Monthly.
Looks up a localized string similar to At task creation/modification.
Looks up a localized string similar to On state change.
Looks up a localized string similar to One time.
Looks up a localized string similar to Weekly.
Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}.
Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}.
Looks up a localized string similar to every.
Looks up a localized string similar to fifth.
Looks up a localized string similar to first.
Looks up a localized string similar to fourth.
Looks up a localized string similar to last.
Looks up a localized string similar to second.
Looks up a localized string similar to third.
Defines the methods that are called by the Task Scheduler service to manage a COM handler.
This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class.
Called to start the COM handler. This method must be implemented by the handler.
An IUnkown interface that is used to communicate back with the Task Scheduler.
The arguments that are required by the handler. These arguments are defined in the property of the COM handler action.
Called to stop the COM handler. This method must be implemented by the handler.
The return code that the Task Schedule will raise as an event when the COM handler action is completed.
Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler.
Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler.
Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler.
Tells the Task Scheduler about the percentage of completion of the COM handler.
A value that indicates the percentage of completion for the COM handler.
The message that is displayed in the Task Scheduler UI.
Tells the Task Scheduler that the COM handler is completed.
The error code that the Task Scheduler will raise as an event.
Collection that contains the actions that are performed by the task.
A Task Scheduler 1.0 task can only contain a single .
Releases all resources used by this class.
Adds an action to the task.
A derived class.
The bound that was added to the collection.
Adds a new instance to the task.
Type of task to be created
Specialized instance.
Clears all actions from the task.
Inserts an action at the specified index.
The zero-based index at which action should be inserted.
The action to insert into the list.
Removes the action at a specified index.
Index of action to remove.
Index out of range.
Returns a that represents the actions in this collection.
A that represents the actions in this collection.
Retrieves an enumeration of each of the actions.
Returns an object that implements the interface and that can iterate through the objects within the .
Gets or sets a an action at the specified index.
The zero-based index of the action to get or set.
Gets or sets the identifier of the principal for the task.
Gets the number of actions in the collection.
Gets or sets an XML-formatted version of the collection.
Releases all resources used by this class.
Defines the type of actions a task can perform.
The action type is defined when the action is created and cannot be changed later. See .
This action fires a handler.
This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name of a document is provided, find its associated application and launch the application with the document.
This action sends and e-mail.
This action shows a message box.
Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the method.
List of unbound values when working with Actions not associated with a registered task.
Creates a new object that is a copy of the current instance.
A new object that is a copy of this instance.
Copies the properties from another the current instance.
The source .
Releases all resources used by this class.
Returns the action Id.
String representation of action.
Creates a specialized class from a defined interface.
Version 2.0 Action interface.
Specialized action class
Creates the specified action.
Type of the action to instantiate.
of specified type.
Gets the type of the action.
The type of the action.
Gets or sets the identifier of the action.
Represents an action that fires a handler. Only available on Task Scheduler 2.0.
Creates an unbound instance of .
Creates an unbound instance of .
Identifier of the handler class.
Addition data associated with the handler.
Copies the properties from another the current instance.
The source .
Gets a string representation of the .
String represention this action.
Gets or sets the identifier of the handler class.
Gets or sets additional data that is associated with the handler.
Represents an action that executes a command-line operation.
Creates a new instance of an that can be added to .
Creates a new instance of an that can be added to .
Path to an executable file.
Arguments associated with the command-line operation. This value can be null.
Directory that contains either the executable file or the files that are used by the executable file. This value can be null.
Copies the properties from another the current instance.
The source .
Gets a string representation of the .
String represention this action.
Gets or sets the identifier of the action.
Gets or sets the path to an executable file.
Gets or sets the arguments associated with the command-line operation.
Gets or sets the directory that contains either the executable file or the files that are used by the executable file.
Represents an action that sends an e-mail.
Creates an unbound instance of .
Creates an unbound instance of .
Subject of the e-mail.
E-mail address that you want to send the e-mail from.
E-mail address or addresses that you want to send the e-mail to.
Body of the e-mail that contains the e-mail message.
Name of the server that you use to send e-mail from.
Copies the properties from another the current instance.
The source .
Gets a string representation of the .
String represention this action.
Gets or sets the name of the server that you use to send e-mail from.
Gets or sets the subject of the e-mail.
Gets or sets the e-mail address or addresses that you want to send the e-mail to.
Gets or sets the e-mail address or addresses that you want to Cc in the e-mail.
Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail.
Gets or sets the e-mail address that you want to reply to.
Gets or sets the e-mail address that you want to send the e-mail from.
Gets or sets the header information in the e-mail message to send.
Gets or sets the body of the e-mail that contains the e-mail message.
Gets or sets an array of attachments that is sent with the e-mail.
Represents an action that shows a message box when a task is activated.
Creates a new unbound instance of .
Creates a new unbound instance of .
Message text that is displayed in the body of the message box.
Title of the message box.
Copies the properties from another the current instance.
The source .
Gets a string representation of the .
String represention this action.
Gets or sets the title of the message box.
Gets or sets the message text that is displayed in the body of the message box.
Abstract class for throwing a method specific exception.
Gets a message that describes the current exception.
Thrown when the calling method is not supported by Task Scheduler 1.0.
Thrown when the calling method is not supported by Task Scheduler 1.0.
Represents a wildcard running on the
engine.
Initializes a wildcard with the given search pattern and options.
The wildcard pattern to match.
A combination of one or more .
Converts a wildcard to a regex.
The wildcard pattern to convert.
A regex equivalent of the given wildcard.
Contains all the tasks that are registered.
Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. This has been removed so that it is consistent with V2.
Releases all resources used by this class.
Gets the collection enumerator for the register task collection.
An for this collection.
Gets the number of registered tasks in the collection.
Gets or sets the regular expression filter for task names.
The regular expression filter.
Gets the specified registered task from the collection.
The index of the registered task to be retrieved.
A instance that contains the requested context.
Gets the named registered task from the collection.
The name of the registered task to be retrieved.
A instance that contains the requested context.
Internal constructor
TaskService instance
The filter.
Releases all resources used by this class.
Moves to the next task. See MoveNext for more information.
true if next task found, false if no more tasks.
Reset task enumeration. See Reset for more information.
Retrieves the current task. See for more information.
Releases all resources used by this class.
Collection of running tasks.
Releases all resources used by this class.
Gets an IEnumerator instance for this collection.
An enumerator.
Gets the number of registered tasks in the collection.
Gets the specified running task from the collection.
The index of the running task to be retrieved.
A instance.
Releases all resources used by this class.
Releases all resources used by this class.
Options for a task, used for the Flags property of a Task. Uses the
"Flags" attribute, so these values are combined with |.
Some flags are documented as Windows 95 only, but they have a
user interface in Windows XP so that may not be true.
The interactive flag is set if the task is intended to be displayed to the user.
If the flag is not set, no user interface associated with the task is presented
to the user when the task is executed.
The task will be deleted when there are no more scheduled run times.
The task is disabled. This is useful to temporarily prevent a task from running
at the scheduled time(s).
The task begins only if the computer is not in use at the scheduled start time. Windows 95 only.
The task terminates if the computer makes an idle to non-idle transition while the task is running.
The computer is not considered idle until the IdleWait triggers' time elapses with no user input.
Windows 95 only. For information regarding idle triggers, see .
The task does not start if its target computer is running on battery power. Windows 95 only.
The task ends, and the associated application quits if the task's target computer switches
to battery power. Windows 95 only.
The task runs only if the system is docked. Windows 95 only.
The task is hidden. When the task begins execution, it runs in a hidden window.
The task runs only if there is currently a valid Internet connection.
This feature is currently not implemented.
The task starts again if the computer makes a non-idle to idle transition before all the
task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only.
The task runs only if the SYSTEM account is available.
The task runs only if the user specified in SetAccountInformation is logged on interactively.
This flag has no effect on work items set to run in the local account.
Status values returned for a task. Some values have been determined to occur although
they do no appear in the Task Scheduler system documentation.
The task is ready to run at its next scheduled time.
The task is currently running.
One or more of the properties that are needed to run this task on a schedule have not been set.
The task has not yet run.
The task will not run at the scheduled times because it has been disabled.
There are no more runs scheduled for this task.
The last run of the task was terminated by the user.
Either the task has no triggers or the existing triggers are disabled or not set.
Event triggers don't have set run times.
Valid types of triggers
Trigger is set to run the task a single time.
Trigger is set to run the task on a daily interval.
Trigger is set to run the work item on specific days of a specific week of a specific month.
Trigger is set to run the task on a specific day(s) of the month.
Trigger is set to run the task on specific days, weeks, and months.
Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task.
Trigger is set to run the task at system startup.
Trigger is set to run the task when a user logs on.
Values for days of the week (Monday, Tuesday, etc.)
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
All days
Values for months of the year (January, February, etc.)
January
February
March
April
May
June
July
August
September
October
November
December
All months
Defines the type of triggers that can be used by tasks.
Triggers the task when a specific event occurs. Version 1.2 only.
Triggers the task at a specific time of day.
Triggers the task on a daily schedule.
Triggers the task on a weekly schedule.
Triggers the task on a monthly schedule.
Triggers the task on a monthly day-of-week schedule.
Triggers the task when the computer goes into an idle state.
Triggers the task when the task is registered. Version 1.2 only.
Triggers the task when the computer boots.
Triggers the task when a specific user logs on.
Triggers the task when a specific user session state changes. Version 1.2 only.
Values for week of month (first, second, ..., last)
First week of the month
Second week of the month
Third week of the month
Fourth week of the month
Last week of the month
Every week of the month
Interface for triggers that support a delay.
Gets or sets a value that indicates the amount of time before the task is started.
The delay duration.
Interface for triggers that support a user identifier.
Gets or sets the user for the .
Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the or the method.
In testing and may change. Do not use until officially introduced into library.
Creates a new that is an unbound copy of this instance.
A new that is an unbound copy of this instance.
Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers except those supporting the interface.
The source .
Releases all resources used by this class.
Returns a string representing this trigger.
String value of trigger.
Creates the specified trigger.
Type of the trigger to instantiate.
of specified type.
Checks the bind value for any conversion.
The key (property) name.
The value.
Assigns the unbound TriggerData structure to the V1 trigger instance.
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
Gets or sets a Boolean value that indicates whether the trigger is enabled.
Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated.
Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0.
Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0.
Gets a instance that indicates how often the task is run and how long the repetition pattern is repeated after the task is started.
Gets or sets the date and time when the trigger is activated.
Gets the type of the trigger.
The of the trigger.
In testing and may change. Do not use until officially introduced into library.
Represents a trigger that starts a task when the system is booted.
Creates an unbound instance of a .
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.
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.
Creates an unbound instance of a .
Interval between the days in the schedule.
Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers except those supporting the interface.
The source .
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
Sets or retrieves the interval between the days in the schedule.
Gets or sets a delay time that is randomly added to the start time of the trigger.
Gets or sets a value that indicates the amount of time before the task is started.
The delay duration.
Represents a trigger that starts a task when a system event occurs. Not available on Task Scheduler 1.0.
Creates an unbound instance of a .
Initializes an unbound instance of the class and sets a basic event.
The event's log.
The event's source. Can be null.
The event's id. Can be null.
Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers except those supporting the interface.
The source .
Gets basic event information.
The event's log.
The event's source. Can be null.
The event's id. Can be null.
true if subscription represents a basic event, false if not.
Sets the subscription for a basic event. This will replace the contents of the property and clear all entries in the property.
The event's log.
The event's source. Can be null.
The event's id. Can be null.
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.
Gets or sets the XPath query string that identifies the event that fires the trigger.
Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query specified in the Subscription property. The name of the query can be used as a variable in the message of a action.
Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions.
Creates an unbound instance of a .
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
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.
Creates an unbound instance of a .
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.
Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator".
This property can be in one of the following formats:
• User name or SID: The task is started when the user logs on to the computer.
• NULL: The task is started when any user logs on to the computer.
If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property.
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.
Creates an unbound instance of a .
The days of the week.
The months of the year.
The weeks of the month.
Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers except those supporting the interface.
The source .
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
Gets or sets the days of the week during which the task runs.
Gets or sets the months of the year during which the task runs.
Gets or sets a delay time that is randomly added to the start time of the trigger.
Gets or sets a Boolean value that indicates that the task runs on the last week of the month.
Gets or sets the weeks of the month during which the task runs.
Gets or sets a value that indicates the amount of time before the task is started.
The delay duration.
Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months.
Creates an unbound instance of a .
The day of the month.
The months of the year.
Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers except those supporting the interface.
The source .
Converts an array of bit indices into a mask with bits turned ON at every index
contained in the array. Indices must be from 1 to 32 and bits are numbered the same.
An array with an element for each bit of the mask which is ON.
An interger to be interpreted as a mask.
Convert an integer representing a mask to an array where each element contains the index
of a bit that is ON in the mask. Bits are considered to number from 1 to 32.
An interger to be interpreted as a mask.
An array with an element for each bit of the mask which is ON.
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
Gets or sets the days of the month during which the task runs.
Gets or sets the months of the year during which the task runs.
Gets or sets a delay time that is randomly added to the start time of the trigger.
Gets or sets a Boolean value that indicates that the task runs on the last day of the month.
Gets or sets a value that indicates the amount of time before the task is started.
The delay duration.
Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0.
Creates an unbound instance of a .
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.
Defines how often the task is run and how long the repetition pattern is repeated after the task is started.
Releases all resources used by this class.
Gets or sets how long the pattern is repeated.
Gets or sets the amount of time between each restart of the task.
Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration.
Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications.
Creates an unbound instance of a .
Initializes a new instance of the class.
The state change.
Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers except those supporting the interface.
The source .
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.
Gets or sets the kind of Terminal Server session change that would trigger a task launch.
Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started.
Represents a trigger that starts a task at a specific date and time.
Creates an unbound instance of a .
Creates an unbound instance of a and assigns the execution time.
Date and time for the trigger to fire.
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
Gets or sets a delay time that is randomly added to the start time of the trigger.
Gets or sets a value that indicates the amount of time before the task is started.
The delay duration.
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.
Creates an unbound instance of a .
The days of the week.
The interval between the weeks in the schedule.
Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers except those supporting the interface.
The source .
Gets the non-localized trigger string for V2 triggers.
String describing the trigger.
Gets or sets the days of the week on which the task runs.
Gets or sets a delay time that is randomly added to the start time of the trigger.
Gets or sets the interval between the weeks in the schedule.
Gets or sets a value that indicates the amount of time before the task is started.
The delay duration.
Impersonation of a user. Allows to execute code under another
user context.
Please note that the account that instantiates the Impersonator class
needs to have the 'Act as part of operating system' privilege set.
Constructor. Starts the impersonation with the given credentials.
Please note that the account that instantiates the Impersonator class
needs to have the 'Act as part of operating system' privilege set.
The name of the user to act as.
The domain name of the user to act as.
The password of the user to act as.