I've succesfully used this (fantastic) library to schedule a task which correctly fired off last night as expected and all seemed well. However I've now noticed that the NextRunTime returned by the library is "30/12/1899 00:00:00", whereas
the value shown in Task Scheduler is "11/04/2012 04:30:00". I've included a code snippet below which pulls back the task incase I'm doing something wrong in there, although all the other task properties seem to be correct at this stage.
Task task = ts.GetTask("usertask-" + Environment.ExpandEnvironmentVariables("%username%"));
if (task != null)
LastRunTime = task.LastRunTime;
LastTaskResult = task.LastTaskResult;
NextRunTime = task.NextRunTime;
State = task.State.ToString();
The problem only occurs after the schedule has run - i.e. when the task is first created the DateTime is read back correctly, but after Windows has run the task and updated the task, an incorrect value is returned.
Any help or pointers would be much appreciated - I'm coding in C# using Visual Studio 2010, targetting .Net 4.0 on Windows 7 x64 and I've downloaded the 1.8.1 release of the library.
Thanks for your time,