TaskNextRunTime Property

Gets the time when the registered task is next scheduled to run.

Definition

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.0
public DateTime NextRunTime { get; }

Property Value

DateTime
Returns MinValue if there are no future run times.

Remarks

Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if there were no future run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all versions will return DateTime.MinValue if there are no future run times. While this is different from the native 2.0 library, it was deemed more appropriate to have consistency between the two libraries and with other .NET libraries.

See Also