TaskSchedulerSnapshotCreate(TaskServiceConnectionToken, String, CancellationToken, IProgressTupleInt32, String) Method

Creates a compressed zip file that contains all the information accessible to the user from the TaskService instance necessary to reconstitute its tasks and folders.

  Caution

This method will execute without error even if the user does not have permissions to see all tasks and folders. It is imperative that the developer ensures that the user has Administrator or equivalent rights before calling this method.

Definition

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.0
public static Task<TaskSchedulerSnapshot> Create(
	TaskServiceConnectionToken tsToken,
	string path,
	CancellationToken cancelToken,
	IProgress<Tuple<int, string>> progress
)

Parameters

tsToken  TaskServiceConnectionToken
The TaskServiceConnectionToken from which to pull the tasks and folders.
path  String
The output zip file in which to place the snapshot information.
cancelToken  CancellationToken
A cancellation token to use to cancel this asynchronous operation.
progress  IProgressTupleInt32, String
An optional IProgressT instance to use to report progress of the asynchronous operation.

Return Value

TaskTaskSchedulerSnapshot
An asynchronous TaskSchedulerSnapshot instance with the contents of the specified Task Scheduler connection.

See Also