Partilhar via


ScheduledJobOptions Class

Definition

This class contains Windows Task Scheduler options.

[System.Serializable]
public sealed class ScheduledJobOptions : System.Runtime.Serialization.ISerializable
[<System.Serializable>]
type ScheduledJobOptions = class
    interface ISerializable
Public NotInheritable Class ScheduledJobOptions
Implements ISerializable
Inheritance
ScheduledJobOptions
Attributes
Implements

Constructors

ScheduledJobOptions()

Default constructor.

Properties

DoNotAllowDemandStart

Do not allow a task to be started on demand.

IdleDuration

How long computer must be idle before task starts.

IdleTimeout

How long task manager will wait for required idle duration.

JobDefinition

ScheduledJobDefinition object associated with this options object.

MultipleInstancePolicy

Multiple task instance policy.

RestartOnIdleResume

Restart task on idle resuming.

RunElevated

Run task with elevated privileges.

RunWithoutNetwork

Run task even if network is not available.

ShowInTaskScheduler

When true task is not shown in Task Scheduler UI.

StartIfNotIdle

Start task only if computer is not idle.

StartIfOnBatteries

Start task if on batteries.

StopIfGoingOffIdle

Stop task if computer is no longer idle.

StopIfGoingOnBatteries

Stop task if computer is going on batteries.

WakeToRun

Wake computer to run task.

Methods

GetObjectData(SerializationInfo, StreamingContext)

GetObjectData for ISerializable implementation.

UpdateJobDefinition()

Update the associated ScheduledJobDefinition object with the current properties of this object.

Applies to