Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

New Post: Task Trigger Start Boundary

$
0
0
The code that I am using fetches the task from Task scheduler and based on whether the StartBoundary node is present or not, we can set the "Activate" checkbox for the trigger.

Task Scheduler allows us to set this time to be somewhere in past as well without any issues.

While mocking the same behaviour, the only check I have is to see if the NODE "StartBoundary" exists in the XML or not. If it does not exist, then the "Activate" Checkbox is unchecked in task scheduler. However, when this task comes to me through the wrapper, the TaskDefinition sets this StartBoundary to current date time if it does not find the node and thus, I now have a StartBoundary set for that trigger.


End result is that even if I have a task with an idle trigger which does not have "Activate" check box checked, it comes out to me with a "Start Date" that is equal to current date time and therefore, "Activate" is set to ON.


I hope I did not confuse things here.

I see the quick fix to this as making the StartBoundary and EndBoundary as DateTime? instead of DateTime and initializing them with NULL.

Although that might have its own issue which I am not yet aware of :)


Thanks
Ashutosh

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>