TaskEventWatcher(String, TaskService) Constructor

Initializes a new instance of the TaskEventWatcher class watching only those events for the task with the provided path on the local machine.

Definition

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.0
public TaskEventWatcher(
	string taskPath,
	TaskService taskService = null
)

Parameters

taskPath  String
The full path (folders and name) of the task to watch.
taskService  TaskService  (Optional)
The task service.

Exceptions

ArgumentException$Invalid task name: {taskPath}

See Also