How to determine if a task is OneTime task or not?

Nov 8, 2012 at 8:18 PM

Which property or method of Task class identifies a OneTime task? 

Coordinator
Nov 9, 2012 at 2:59 AM

Add a single TimeTrigger to the task definition.

Nov 9, 2012 at 3:32 PM

Dahall,

When i created a one time task with TimeTrigger and retrieved the information, the NextRun has 12/31/1899 12:00:00 AM. Can i check for presence of this value in the NextRun to identify a task as OneTime execution? Is there a better way to do the check?

Thanks!

Coordinator
Nov 10, 2012 at 1:45 AM

That would be correct. The task has already exectuted unless you specified a StartBoundary in the future for the specific time you want it to run:

new TimeTrigger(new DateTime(2012, 12, 31, 13, 0, 0, 0))

The above would produce a task who's next run time should be Dec 31, 2012 at 1pm.