public abstract record TaskTrigger : IEquatable<TaskTrigger> Common trigger settings.
Remarks
The set of trigger types is closed: only the ten trigger records in this namespace derive from it.
A boundary's DateTime.Kind selects how Task Scheduler interprets it:
DateTimeKind.Unspecified: a wall-clock time of the target machine, written without an offset. This is Task Scheduler's default: the trigger follows that machine's time zone and daylight saving time.DateTimeKind.Utc: a point in time, written withZ(Task Scheduler's "synchronize across time zones").DateTimeKind.Local: a point in time, written with the UTC offset that the computer running this client has at that time.
Boundaries have whole seconds; a value with a fraction of a second is rejected with an ArgumentException.
Properties
Enabled
public bool Enabled { get; init; } Whether the trigger is enabled.
EndBoundary
public DateTime? EndBoundary { get; init; } Optional end boundary; its DateTime.Kind selects local wall-clock or synchronized time.
StartBoundary
public DateTime? StartBoundary { get; init; } Optional start boundary; its DateTime.Kind selects local wall-clock or synchronized time.