ScheduledJobTrigger Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Contains information that is used to define how and when a PowerShell job is run by Windows Task Scheduler (WTS). This class cannot be inherited. Introduced in Windows PowerShell 3.0.

Namespace:   Microsoft.PowerShell.ScheduledJob
Assembly:  Microsoft.PowerShell.ScheduledJob (in Microsoft.PowerShell.ScheduledJob.dll)

System.Object
  Microsoft.PowerShell.ScheduledJob.ScheduledJobTrigger

[SerializableAttribute]
public sealed class ScheduledJobTrigger : ISerializable

NameDescription
System_CAPS_pubmethodScheduledJobTrigger()

Initializes a new instance of the ScheduledJobTrigger class. Introduced in Windows PowerShell 3.0.

NameDescription
System_CAPS_pubpropertyAt

Gets or sets the time to activate the trigger. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyDaysOfWeek

Gets or sets the days of the week to activate the trigger. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyEnabled

Gets or sets a value that indicates whether to enable the trigger. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyFrequency

Gets or sets the trigger frequency (AtLogon, AtStartup, Daily, None, Once, or Weekly). Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyId

Gets or sets the local identifier of the trigger. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyInterval

Gets or sets the interval (number of days or weeks) between trigger activations. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyJobDefinition

Gets or sets the scheduled job definition that the trigger is associated with. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyRandomDelay

Gets or sets the maximum time of the random delay that can occur after the scheduled start time. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyRepetitionDuration

Gets or sets how long the repetition pattern is repeated. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyRepetitionInterval

Gets or sets the amount of time between each restart of the job. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyUser

Gets or sets the user name that the trigger is associated with. Introduced in Windows PowerShell 3.0.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticCreateAtLogOnTrigger(String, TimeSpan, Int32, Boolean)

Creates a trigger that activates after user logon. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodSystem_CAPS_staticCreateAtStartupTrigger(TimeSpan, Int32, Boolean)

Creates a trigger that activates after the operation system restarts. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodSystem_CAPS_staticCreateDailyTrigger(DateTime, Int32, TimeSpan, Int32, Boolean)

Creates a trigger that activates on certain days. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodSystem_CAPS_staticCreateOnceTrigger(DateTime, TimeSpan, Nullable<TimeSpan>, Nullable<TimeSpan>, Int32, Boolean)

Creates a trigger that activates one time. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodSystem_CAPS_staticCreateWeeklyTrigger(DateTime, Int32, IEnumerable<DayOfWeek>, TimeSpan, Int32, Boolean)

Creates a trigger that activates on during certain weeks. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetObjectData(SerializationInfo, StreamingContext)

Populates an object with the data needed to serialize the scheduled job trigger. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodUpdateJobDefinition()

Update the associated scheduled job definition with the current properties of the scheduled job trigger. Introduced in Windows PowerShell 3.0.

This class can be serialized.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: