Click or drag to resize
Task Scheduler Managed Class Library

TaskSchedulerSnapshot Class

Represents all the information about the tasks and folders from a TaskService instance that can be used to reconstitute tasks and folders on the same or different systems.
Note Note
This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to dependencies on threading and compressed (zip) files.
Inheritance Hierarchy
SystemObject
  Microsoft.Win32.TaskSchedulerTaskSchedulerSnapshot

Namespace:  Microsoft.Win32.TaskScheduler
Assembly:  Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntax
public sealed class TaskSchedulerSnapshot : IXmlSerializable
Request Example View Source

The TaskSchedulerSnapshot type exposes the following members.

Constructors
  NameDescription
Public methodTaskSchedulerSnapshot
Creates a new instance of TaskSchedulerSnapshot from an existing snapshot.
Top
Properties
  NameDescription
Public propertyItems
Gets a list of TaskSnapshot and TaskFolderSnapshot instances the represent the tasks and folders from a Task Scheduler instance.
Public propertyPath
Gets the path of the file based snapshot.
Public propertyTargetServer
Gets the machine name of the server from which the snapshot was taken.
Public propertyTimeStamp
Gets the UTC time stamp for when the snapshot was taken.
Top
Methods
  NameDescription
Public methodStatic memberCreate(TaskService, String)
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.
Note Note
This method can take many seconds to execute. It is recommended to call the asynchronous version.
Caution note 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.
Public methodStatic memberCreate(TaskServiceConnectionToken, String, CancellationToken, IProgressTupleInt32, String)
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 note 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.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberOpen
Opens an existing snapshot and returns a new instance of TaskSchedulerSnapshot.
Public methodRestore(TaskService, ICollectionSnapshotItem, Boolean, Boolean, IDictionaryString, String)
Register a list of snapshot items (tasks and folders) into the specified Task Scheduler.
Public methodRestore(TaskServiceConnectionToken, ICollectionSnapshotItem, Boolean, Boolean, IDictionaryString, String, CancellationToken, IProgressTupleInt32, String)
Register a list of snapshot items (tasks and folders) into the specified Task Scheduler.
Public methodRestore(TaskServiceConnectionToken, IEnumerableString, Boolean, Boolean, IDictionaryString, String, CancellationToken, IProgressTupleInt32, String)
Register a list of snapshot items (tasks and folders) into the specified Task Scheduler.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also