Task Scheduler

Overview of the Task Scheduler technology.

To develop Task Scheduler, you need these headers:

For programming guidance for this technology, see:

Enumerations

Title Description
TASK_ACTION_TYPE Defines the type of actions that a task can perform.
TASK_COMPATIBILITY Defines what versions of Task Scheduler or the AT command that the task is compatible with.
TASK_CREATION Defines how the Task Scheduler service creates, updates, or disables the task.
TASK_ENUM_FLAGS Defines how the Task Scheduler enumerates through registered tasks.
TASK_INSTANCES_POLICY Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task.
TASK_LOGON_TYPE Defines what logon technique is required to run a task.
TASK_PROCESSTOKENSID_TYPE Defines the types of process security identifier (SID) that can be used by tasks.
TASK_RUN_FLAGS Defines how a task is run.
TASK_RUNLEVEL_TYPE Defines LUA elevation flags that specify with what privilege level the task will be run.
TASK_SESSION_STATE_CHANGE_TYPE Defines what kind of Terminal Server session state change you can use to trigger a task to start.
TASK_STATE Defines the different states that a registered task can be in.
TASK_TRIGGER_TYPE Defines the types of triggers associated with a task.
TASK_TRIGGER_TYPE2 Defines the type of triggers that can be used by tasks.
TASKPAGE Defines the type of task page to be retrieved.

Functions

Title Description
Activate The Activate method returns an active interface for a specified work item.
AddRequiredPrivilege Adds the required privilege to the task process token.
AddWorkItem The AddWorkItem method adds a task to the schedule of tasks.
Clear Clears all the actions from the collection.
Clear Clears the entire collection of name-value pairs.
Clear Clears all triggers from the collection.
Clone Creates a new enumeration object that contains the same enumeration state as the current enumeration.
Connect Connects to a remote computer and associates all subsequent calls on this interface with a remote session.
Create Creates and adds a new action to the collection.
Create Creates a name-value pair in the collection.
Create Creates a new trigger for the task.
CreateFolder Creates a folder for related tasks.
CreateTrigger Creates a trigger for the work item.
Delete The Delete method deletes a task.
DeleteFolder Deletes a subfolder from the parent folder.
DeleteTask Deletes a task from the folder.
DeleteTrigger Deletes a trigger from a work item.
EditWorkItem Displays the Task, Schedule, and settings property pages for the work item, allowing a user set the properties on those pages.
Enum The Enum method retrieves a pointer to an OLE enumerator object that enumerates the tasks in the current task folder.
get__NewEnum Gets the collection enumerator for the action collection.
get__NewEnum Gets the collection enumerator for the register task collection.
get__NewEnum Gets the collection enumerator for the running task collection.
get__NewEnum Gets the collection enumerator for the folder collection.
get__NewEnum Gets the collection enumerator for the name-value pair collection.
get__NewEnum Gets the collection enumerator for the trigger collection.
get_Actions Gets or sets a collection of actions performed by the task.
get_AllowDemandStart Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu.
get_AllowHardTerminate Gets or sets a Boolean value that indicates that the task may be terminated by the Task Scheduler service using TerminateProcess.
get_Arguments Gets or sets the arguments associated with the command-line operation.
get_Attachments Gets or sets the pointer to an array of attachments that is sent with the email message.
get_Author Gets or sets the author of the task.
get_Bcc Gets or sets the email address or addresses that you want to Bcc in the email message.
get_Body Gets or sets the body of the email that contains the email message.
get_Cc Gets or sets the email address or addresses that you want to Cc in the email message.
get_ClassId Gets or sets the identifier of the handler class.
get_Compatibility Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with.
get_Connected Gets a Boolean value that indicates if you are connected to the Task Scheduler service.
get_ConnectedDomain Gets the name of the domain to which the TargetServer computer is connected.
get_ConnectedUser Gets the name of the user that is connected to the Task Scheduler service.
get_Context Gets or sets the identifier of the principal for the task.
get_Count Gets the number of actions in the collection.
get_Count Gets the number of registered tasks in the collection.
get_Count Gets the number of running tasks in the collection.
get_Count Gets the number of folders in the collection.
get_Count Gets the number of name-value pairs in the collection.
get_Count Gets the number of triggers in the collection.
get_CurrentAction Gets the name of the current action that the running task is performing.
get_Data Gets or sets additional data that is associated with the handler.
get_Data Gets or sets the data that is associated with the task.
get_Date Gets or sets the date and time when the task is registered.
get_DaysInterval Gets or sets the interval between the days in the schedule.
get_DaysOfMonth Gets or sets the days of the month during which the task runs.
get_DaysOfWeek Gets or sets the days of the week during which the task runs.
get_DaysOfWeek Gets or sets the days of the week in which the task runs.
get_Deadline Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to complete during regular Automatic maintenance.
get_Definition Gets the definition of the task.
get_Delay Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.
get_Delay Gets or sets a value that indicates the amount of time between when the event occurs and when the task is started.
get_Delay Gets or sets a value that indicates the amount of time between when the user logs on and when the task is started.
get_Delay Gets or sets the amount of time between when the task is registered and when the task is started.
get_Delay Gets or sets a value that indicates how long of a delay takes place before a task is started after a Terminal Server session state change is detected.
get_DeleteExpiredTaskAfter Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires.
get_Description Gets or sets the description of the task.
get_DisallowStartIfOnBatteries Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on batteries.
get_DisallowStartOnRemoteAppSession Gets or sets a Boolean value that specifies that the task will not be started if triggered to run in a Remote Applications Integrated Locally (RAIL) session.
get_DisplayName Gets or sets the name of the principal.
get_Documentation Gets or sets any additional documentation for the task.
get_Duration Gets or sets how long the pattern is repeated.
get_Enabled Gets or sets a Boolean value that indicates if the registered task is enabled.
get_Enabled Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is True.
get_Enabled Gets or sets a Boolean value that indicates whether the trigger is enabled.
get_EndBoundary Gets or sets the date and time when the trigger is deactivated.
get_EnginePID Gets the process ID for the engine (process) which is running the task.
get_Exclusive Indicates whether the Task scheduler must start the task during the Automatic maintenance in exclusive mode.
get_ExecutionTimeLimit Gets or sets the amount of time that is allowed to complete the task.
get_ExecutionTimeLimit Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run.
get_From Gets or sets the email address that you want to send the email from.
get_GroupId Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal.
get_HeaderFields Gets or sets the header information in the email message to send.
get_Hidden Gets or sets a Boolean value that indicates that the task will not be visible in the UI.
get_HighestVersion Indicates the highest version of Task Scheduler that a computer supports.
get_Id Gets or sets the identifier of the action.
get_Id Gets or sets a GUID value that identifies a network profile.
get_Id Gets or sets the identifier of the principal.
get_Id Gets or sets the identifier for the trigger.
get_IdleDuration 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.
get_IdleSettings Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle condition.
get_InstanceGuid Gets the GUID identifier for this instance of the task.
get_Interval Gets or sets the amount of time between each restart of the task.
get_Item Gets a specified action from the collection.
get_Item Gets the specified registered task from the collection.
get_Item Gets the specified task from the collection.
get_Item Gets the specified folder from the collection.
get_Item Gets the specified name-value pair from the collection.
get_Item Gets the specified trigger from the collection.
get_LastRunTime Gets the time the registered task was last run.
get_LastTaskResult Gets the results that were returned the last time the registered task was run.
get_LogonType Gets or sets the security logon method that is required to run the tasks that are associated with the principal.
get_MaintenanceSettings Gets or sets a pointer to pointer to an IMaintenanceSettingsobject that Task scheduler uses to perform a task during Automatic maintenance.
get_MessageBody Gets or sets the message text that is displayed in the body of the message box.
get_MonthsOfYear Gets or sets the months of the year during which the task runs.
get_MonthsOfYear Gets or sets the months of the year during which the task runs.
get_MultipleInstances Gets or sets the policy that defines how the Task Scheduler deals with multiple instances of the task.
get_Name Gets or sets the name of a network profile.
get_Name Gets the name of the registered task.
get_Name Gets the name of the task.
get_Name Gets the name that is used to identify the folder that contains a task.
get_Name Gets or sets the name that is associated with a value in a name-value pair.
get_NetworkSettings Gets or sets the network settings object that contains a network profile identifier and name.
get_NextRunTime Gets the time when the registered task is next scheduled to run.
get_NumberOfMissedRuns Gets the number of times the registered task has missed a scheduled run.
get_Path Gets or sets the path to an executable file.
get_Path Gets the path to where the registered task is stored.
get_Path Gets the path to where the task is stored.
get_Path Gets the path to where the folder is stored.
get_Period Gets or sets the amount of time the task needs to be once executed during regular Automatic maintenance.
get_Principal Gets or sets the principal for the task that provides the security credentials for the task.
get_Priority Gets or sets the priority level of the task.
get_ProcessTokenSidType Gets or sets the task process security identifier (SID) type.
get_RandomDelay Gets or sets a delay time that is randomly added to the start time of the trigger.
get_RandomDelay Gets or sets a delay time that is randomly added to the start time of the trigger.
get_RandomDelay Gets or sets a delay time that is randomly added to the start time of the trigger.
get_RandomDelay Gets or sets a delay time that is randomly added to the start time of the trigger.
get_RandomDelay Gets or sets a delay time that is randomly added to the start time of the trigger.
get_RegistrationInfo Gets or sets the registration information used to describe a task, such as the description of the task, the author of the task, and the date the task is registered.
get_Repetition Gets or sets a value that indicates how often the task is run and how long the repetition pattern is repeated after the task is started.
get_ReplyTo Gets or sets the email address that you want to reply to.
get_RequiredPrivilege Gets the required privilege of the task by index.
get_RequiredPrivilegeCount Gets the number of privileges in the required privileges array.
get_RestartCount Gets or sets the number of times that the Task Scheduler will attempt to restart the task.
get_RestartInterval Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task.
get_RestartOnIdle Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once.
get_RunLevel 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.
get_RunOnLastDayOfMonth Gets or sets a Boolean value that indicates that the task runs on the last day of the month.
get_RunOnLastWeekOfMonth Gets or sets a Boolean value that indicates that the task runs on the last week of the month.
get_RunOnlyIfIdle 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.
get_RunOnlyIfNetworkAvailable Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available.
get_SecurityDescriptor Gets or sets the security descriptor of the task.
get_Server Gets or sets the name of the SMTP server that you use to send email from.
get_Settings Gets or sets the settings that define how the Task Scheduler service performs the task.
get_Source Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user.
get_StartBoundary Gets or sets the date and time when the trigger is activated.
get_StartWhenAvailable 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.
get_State Gets the operational state of the registered task.
get_State Gets an identifier for the state of the running task.
get_StateChange Gets or sets the kind of Terminal Server session change that would trigger a task launch.
get_StopAtDurationEnd Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of the repetition pattern duration.
get_StopIfGoingOnBatteries Gets or sets a Boolean value that indicates that the task will be stopped if the computer is going onto batteries.
get_StopOnIdleEnd 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. The idle condition ends when the computer is no longer idle.
get_Subject Gets or sets the subject of the email message.
get_Subscription Gets or sets a query string that identifies the event that fires the trigger.
get_TargetServer Gets the name of the computer that is running the Task Scheduler service that the user is connected to.
get_Title Gets or sets the title of the message box.
get_To Gets or sets the email address or addresses that you want to send the email to.
get_Triggers Gets or sets a collection of triggers used to start a task.
get_Type Gets the type of action.
get_Type Gets the type of the trigger.
get_URI Gets or sets the URI of the task.
get_UserId Gets or sets the identifier of the user.
get_UserId Gets or sets the user identifier that is required to run the tasks that are associated with the principal.
get_UserId Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started.
get_UseUnifiedSchedulingEngine Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task.
get_Value Gets or sets the value that is associated with a name in a name-value pair.
get_ValueQueries Gets or sets 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.
get_Version Gets or sets the version number of the task.
get_Volatile Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts.
get_WaitTimeout Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur.
get_WakeToRun Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task, and keep the computer awake until the task is completed.
get_WeeksInterval Gets or sets the interval between the weeks in the schedule.
get_WeeksOfMonth Gets or sets the weeks of the month during which the task runs.
get_WorkingDirectory Gets or sets the directory that contains either the executable file or the files that are used by the executable file.
get_Xml Gets the XML-formatted registration information for the registered task.
get_XmlText Gets or sets an XML-formatted version of the collection.
get_XmlText Gets or sets an XML-formatted version of the registration information for the task.
get_XmlText Gets or sets the XML-formatted definition of the task.
get_XmlText Gets or sets an XML-formatted definition of the task settings.
GetAccountInformation Retrieves the account name for the work item.
GetApplicationName This method retrieves the name of the application that the task is associated with.
GetComment Retrieves the comment for the work item.
GetContext Used to share the context between different steps and tasks that are in the same job instance.
GetCreator Retrieves the name of the creator of the work item.
GetErrorRetryCount Retrieves the number of times that the Task Scheduler will retry an operation when an error occurs. This method is not implemented.
GetErrorRetryInterval Retrieves the time interval, in minutes, between Task Scheduler's attempts to run a work item if an error occurs. This method is not implemented.
GetExitCode Retrieves the last exit code returned by the executable associated with the work item on its last run. The method also returns the exit code returned to Task Scheduler when it last attempted to run the work item.
GetFlags Retrieves the flags that modify the behavior of any type of work item.
GetFolder Gets a folder that contains tasks at a specified location.
GetFolder Gets a folder of registered tasks.
GetFolders Gets all the subfolders in the folder.
GetIdleWait Retrieves the idle wait time for the work item.
GetInput Gets the input variables for a task.
GetInstances Returns all instances of the currently running registered task.
GetMaxRunTime This method retrieves the maximum length of time, in milliseconds, the task can run before terminating.
GetMostRecentRunTime Retrieves the most recent time the work item began running.
GetNextRunTime Retrieves the next time the work item will run.
GetPage This method retrieves one or more property sheet pages associated with a task object.
GetParameters This method retrieves the task's command-line parameters.
GetPriority This method retrieves the priority for the task.
GetRunningTasks Gets a collection of running tasks.
GetRunTimes Retrieves the work item run times for a specified time period.
GetRunTimes Gets the times that the registered task is scheduled to run during a specified time.
GetSecurityDescriptor Gets the security descriptor that is used as credentials for the registered task.
GetSecurityDescriptor Gets the security descriptor for the folder.
GetStatus Retrieves the status of the work item.
GetTargetComputer The GetTargetComputer method returns the name of the computer on which ITaskScheduler is currently targeted.
GetTask Gets a task at a specified location in a folder.
GetTaskFlags This method returns the flags that modify the behavior of a task.
GetTasks Gets all the tasks in the folder.
GetTrigger Retrieves a task trigger.
GetTrigger The GetTrigger method retrieves the current task trigger.
GetTriggerCount Retrieves the number of triggers for the current work item.
GetTriggerString Retrieves a string that describes the work item trigger.
GetTriggerString The GetTriggerString method retrieves the current task trigger in the form of a string. This string appears in the Task Scheduler user interface in a form similar to "At 2PM every day, starting 5/11/97.".
GetWorkingDirectory This method retrieves the task'sworking directory.
GetWorkItemData Retrieves application-defined data associated with the work item.
IsOfType The IsOfType method checks the object's type to verify that it supports a particular interface.
NewTask Returns an empty task definition object to be filled in with settings and properties and then registered using the ITaskFolder::RegisterTaskDefinition method.
NewWorkItem The NewWorkItem method creates a new work item, allocating space for the work item and retrieving its address.
Next Retrieves the next specified number of tasks in the enumeration sequence.
Pause Called to pause the COM handler.
put_Actions Gets or sets a collection of actions performed by the task.
put_AllowDemandStart Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu.
put_AllowHardTerminate Gets or sets a Boolean value that indicates that the task may be terminated by the Task Scheduler service using TerminateProcess.
put_Arguments Gets or sets the arguments associated with the command-line operation.
put_Attachments Gets or sets the pointer to an array of attachments that is sent with the email message.
put_Author Gets or sets the author of the task.
put_Bcc Gets or sets the email address or addresses that you want to Bcc in the email message.
put_Body Gets or sets the body of the email that contains the email message.
put_Cc Gets or sets the email address or addresses that you want to Cc in the email message.
put_ClassId Gets or sets the identifier of the handler class.
put_Compatibility Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with.
put_Context Gets or sets the identifier of the principal for the task.
put_Data Gets or sets additional data that is associated with the handler.
put_Data Gets or sets the data that is associated with the task.
put_Date Gets or sets the date and time when the task is registered.
put_DaysInterval Gets or sets the interval between the days in the schedule.
put_DaysOfMonth Gets or sets the days of the month during which the task runs.
put_DaysOfWeek Gets or sets the days of the week during which the task runs.
put_DaysOfWeek Gets or sets the days of the week in which the task runs.
put_Deadline Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to complete during regular Automatic maintenance.
put_Delay Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.
put_Delay Gets or sets a value that indicates the amount of time between when the event occurs and when the task is started.
put_Delay Gets or sets a value that indicates the amount of time between when the user logs on and when the task is started.
put_Delay Gets or sets the amount of time between when the task is registered and when the task is started.
put_Delay Gets or sets a value that indicates how long of a delay takes place before a task is started after a Terminal Server session state change is detected.
put_DeleteExpiredTaskAfter Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires.
put_Description Gets or sets the description of the task.
put_DisallowStartIfOnBatteries Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on batteries.
put_DisallowStartOnRemoteAppSession Gets or sets a Boolean value that specifies that the task will not be started if triggered to run in a Remote Applications Integrated Locally (RAIL) session.
put_DisplayName Gets or sets the name of the principal.
put_Documentation Gets or sets any additional documentation for the task.
put_Duration Gets or sets how long the pattern is repeated.
put_Enabled Gets or sets a Boolean value that indicates if the registered task is enabled.
put_Enabled Gets or sets a Boolean value that indicates whether the trigger is enabled.
put_EndBoundary Gets or sets the date and time when the trigger is deactivated.
put_Exclusive Indicates whether the Task scheduler must start the task during the Automatic maintenance in exclusive mode.
put_ExecutionTimeLimit Gets or sets the amount of time that is allowed to complete the task.
put_ExecutionTimeLimit Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run.
put_From Gets or sets the email address that you want to send the email from.
put_GroupId Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal.
put_HeaderFields Gets or sets the header information in the email message to send.
put_Hidden Gets or sets a Boolean value that indicates that the task will not be visible in the UI.
put_Id Gets or sets the identifier of the action.
put_Id Gets or sets a GUID value that identifies a network profile.
put_Id Gets or sets the identifier of the principal.
put_Id Gets or sets the identifier for the trigger.
put_IdleDuration 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.
put_IdleSettings Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle condition.
put_Interval Gets or sets the amount of time between each restart of the task.
put_LogonType Gets or sets the security logon method that is required to run the tasks that are associated with the principal.
put_MaintenanceSettings Gets or sets a pointer to pointer to an IMaintenanceSettingsobject that Task scheduler uses to perform a task during Automatic maintenance.
put_MessageBody Gets or sets the message text that is displayed in the body of the message box.
put_MonthsOfYear Gets or sets the months of the year during which the task runs.
put_MonthsOfYear Gets or sets the months of the year during which the task runs.
put_MultipleInstances Gets or sets the policy that defines how the Task Scheduler deals with multiple instances of the task.
put_Name Gets or sets the name of a network profile.
put_Name Gets or sets the name that is associated with a value in a name-value pair.
put_NetworkSettings Gets or sets the network settings object that contains a network profile identifier and name.
put_Path Gets or sets the path to an executable file.
put_Period Gets or sets the amount of time the task needs to be once executed during regular Automatic maintenance.
put_Principal Gets or sets the principal for the task that provides the security credentials for the task.
put_Priority Gets or sets the priority level of the task.
put_ProcessTokenSidType Gets or sets the task process security identifier (SID) type.
put_RandomDelay Gets or sets a delay time that is randomly added to the start time of the trigger.
put_RandomDelay Gets or sets a delay time that is randomly added to the start time of the trigger.
put_RandomDelay Gets or sets a delay time that is randomly added to the start time of the trigger.
put_RandomDelay Gets or sets a delay time that is randomly added to the start time of the trigger.
put_RandomDelay Gets or sets a delay time that is randomly added to the start time of the trigger.
put_RegistrationInfo Gets or sets the registration information used to describe a task, such as the description of the task, the author of the task, and the date the task is registered.
put_Repetition Gets or sets a value that indicates how often the task is run and how long the repetition pattern is repeated after the task is started.
put_ReplyTo Gets or sets the email address that you want to reply to.
put_RestartCount Gets or sets the number of times that the Task Scheduler will attempt to restart the task.
put_RestartInterval Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task.
put_RestartOnIdle Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once.
put_RunLevel 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.
put_RunOnLastDayOfMonth Gets or sets a Boolean value that indicates that the task runs on the last day of the month.
put_RunOnLastWeekOfMonth Gets or sets a Boolean value that indicates that the task runs on the last week of the month.
put_RunOnlyIfIdle 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.
put_RunOnlyIfNetworkAvailable Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available.
put_SecurityDescriptor Gets or sets the security descriptor of the task.
put_Server Gets or sets the name of the SMTP server that you use to send email from.
put_Settings Gets or sets the settings that define how the Task Scheduler service performs the task.
put_Source Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user.
put_StartBoundary Gets or sets the date and time when the trigger is activated.
put_StartWhenAvailable 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.
put_StateChange Gets or sets the kind of Terminal Server session change that would trigger a task launch.
put_StopAtDurationEnd Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of the repetition pattern duration.
put_StopIfGoingOnBatteries Gets or sets a Boolean value that indicates that the task will be stopped if the computer is going onto batteries.
put_StopOnIdleEnd 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. The idle condition ends when the computer is no longer idle.
put_Subject Gets or sets the subject of the email message.
put_Subscription Gets or sets a query string that identifies the event that fires the trigger.
put_Title Gets or sets the title of the message box.
put_To Gets or sets the email address or addresses that you want to send the email to.
put_Triggers Gets or sets a collection of triggers used to start a task.
put_URI Gets or sets the URI of the task.
put_UserId Gets or sets the identifier of the user.
put_UserId Gets or sets the user identifier that is required to run the tasks that are associated with the principal.
put_UserId Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started.
put_UseUnifiedSchedulingEngine Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task.
put_Value Gets or sets the value that is associated with a name in a name-value pair.
put_ValueQueries Gets or sets 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.
put_Version Gets or sets the version number of the task.
put_Volatile Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts.
put_WaitTimeout Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur.
put_WakeToRun Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task, and keep the computer awake until the task is completed.
put_WeeksInterval Gets or sets the interval between the weeks in the schedule.
put_WeeksOfMonth Gets or sets the weeks of the month during which the task runs.
put_WorkingDirectory Gets or sets the directory that contains either the executable file or the files that are used by the executable file.
put_XmlText Gets or sets an XML-formatted version of the collection.
put_XmlText Gets or sets an XML-formatted version of the registration information for the task.
put_XmlText Gets or sets the XML-formatted definition of the task.
put_XmlText Gets or sets an XML-formatted definition of the task settings.
Refresh Refreshes all of the local instance variables of the task.
RegisterTask Registers (creates) a new task in the folder using XML to define the task.
RegisterTaskDefinition Registers (creates) a task in a specified location using the ITaskDefinition interface to define a task.
Remove Removes the specified action from the collection.
Remove Removes a selected name-value pair from the collection.
Remove Removes the specified trigger from the collection of triggers used by the task.
Reset Resets the enumeration sequence to the beginning.
Resume Called to resume the COM handler.
Run Sends a request to the Task Scheduler service to run the work item.
Run Runs the registered task immediately.
RunEx Runs the registered task immediately using specified flags and a session identifier.
SetAccountInformation Sets the account name and password used to run the work item.
SetApplicationName This method assigns a specific application to the current task.
SetComment Sets the comment for the work item.
SetCreator Sets the name of the work item's creator.
SetErrorRetryCount Sets the number of times Task Scheduler will try to run the work item again if an error occurs. This method is not implemented.
SetErrorRetryInterval Sets the time interval, in minutes, between Task Scheduler's attempts to run a work item after an error occurs. This method is not implemented.
SetFlags Sets the flags that modify the behavior of any type of work item.
SetIdleWait Sets the minutes that the system must be idle before the work item can run.
SetMaxRunTime This method sets the maximum time the task can run, in milliseconds, before terminating.
SetOutput Sets the output variables for a task.
SetParameters This method sets the command-line parameters for the task.
SetPriority This method sets the priority for the task.
SetSecurityDescriptor Sets the security descriptor that is used as credentials for the registered task.
SetSecurityDescriptor Sets the security descriptor for the folder.
SetTargetComputer The SetTargetComputer method selects the computer that the ITaskScheduler interface operates on, allowing remote task management and enumeration.
SetTaskFlags This method sets the flags that modify the behavior of a scheduled task.
SetTrigger The SetTrigger method sets the trigger criteria for a task trigger.
SetWorkingDirectory This method sets the working directory for the task.
SetWorkItemData This method stores application-defined data associated with the work item.
Skip Skips the next specified number of tasks in the enumeration sequence.
Start Called to start the COM handler.
Stop Stops the registered task immediately.
Stop Stops this instance of the task.
Stop Called to stop the COM handler.
TaskCompleted Tells the Task Scheduler that the COM handler is completed.
Terminate This method ends the execution of the work item.
UpdateStatus Tells the Task Scheduler about the percentage of completion of the COM handler.

Interfaces

Title Description
IAction Provides the common properties inherited by all action objects.
IActionCollection Contains the actions that are performed by the task.
IBootTrigger Represents a trigger that starts a task when the system is started.
IComHandlerAction Represents an action that fires a handler.
IDailyTrigger Represents a trigger that starts a task based on a daily schedule.
IEmailAction Represents an action that sends an email message.
IEnumWorkItems Provides the methods for enumerating the tasks in the Scheduled Tasks folder.
IEventTrigger Represents a trigger that starts a task when a system event occurs.
IExecAction Represents an action that executes a command-line operation.
IIdleSettings Specifies how the Task Scheduler performs tasks when the computer is in an idle condition.
IIdleTrigger Represents a trigger that starts a task when the computer goes into an idle state.
ILogonTrigger Represents a trigger that starts a task when a user logs on.
IMaintenanceSettings Provides the settings that the Task Scheduler uses to perform task during Automatic maintenance.
IMonthlyDOWTrigger Represents a trigger that starts a task on a monthly day-of-week schedule.
IMonthlyTrigger Represents a trigger that starts a job based on a monthly schedule.
INetworkSettings Provides the settings that the Task Scheduler service uses to obtain a network profile.
IPrincipal Provides the security credentials for a principal.
IPrincipal2 Provides the extended settings applied to security credentials for a principal.
IProvideTaskPage Provides the methods to access the property sheet settings of a task.
IRegisteredTask 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.
IRegisteredTaskCollection Contains all the tasks that are registered.
IRegistrationInfo Provides the administrative information that can be used to describe the task.
IRegistrationTrigger Represents a trigger that starts a task when the task is registered or updated.
IRepetitionPattern Defines how often the task is run and how long the repetition pattern is repeated after the task is started.
IRunningTask Provides the methods to get information from and control a running task.
IRunningTaskCollection Provides a collection that is used to control running tasks.
IScheduledWorkItem Provides the methods for managing specific work items.
ISessionStateChangeTrigger Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications.
IShowMessageAction Represents an action that shows a message box when a task is activated.
ITask Provides the methods for running tasks, getting or setting task information, and terminating tasks. It is derived from the IScheduledWorkItem interface and inherits all the methods of that interface.
ITaskDefinition Defines all the components of a task, such as the task settings, triggers, actions, and registration information.
ITaskFolder 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.
ITaskFolderCollection Provides information and control for a collection of folders that contain tasks.
ITaskHandler Defines the methods that are called by the Task Scheduler service to manage a COM handler.
ITaskHandlerStatus Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler.
ITaskNamedValueCollection Contains a collection of ITaskNamedValuePair interface name-value pairs.
ITaskNamedValuePair Creates a name-value pair in which the name is associated with the value.
ITaskScheduler Provides the methods for scheduling tasks.
ITaskService Provides access to the Task Scheduler service for managing registered tasks.
ITaskSettings Provides the settings that the Task Scheduler service uses to perform the task.
ITaskSettings2 Provides the extended settings that the Task Scheduler uses to run the task.
ITaskSettings3 Provides the extended settings that the Task Scheduler uses to run the task.
ITaskTrigger Provides the methods for accessing and setting triggers for a task. Triggers specify task start times, repetition criteria, and other parameters that control when a task is run.
ITaskVariables Defines task variables that can be passed as parameters to task handlers and external executables that are launched by tasks.
ITimeTrigger Represents a trigger that starts a task at a specific date and time.
ITrigger Provides the common properties that are inherited by all trigger objects.
ITriggerCollection Provides the methods that are used to add to, remove from, and get the triggers of a task.
IWeeklyTrigger Represents a trigger that starts a task based on a weekly schedule.

Structures

Title Description
DAILY Defines the interval, in days, at which a task is run.
MONTHLYDATE Defines the day of the month the task will run.
MONTHLYDOW Defines the date(s) that the task runs by month, week, and day of the week.
TASK_TRIGGER Defines the times to run a scheduled work item.
TRIGGER_TYPE_UNION Defines the invocation schedule of the trigger within the Type member of a TASK_TRIGGER structure.
WEEKLY Defines the interval, in weeks, between invocations of a task.