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

New Post: TriggerEditDialog - how to add edited TimeTrigger to a Task Definition?

$
0
0
After editing a TimeTrigger (MyTrigger) in TriggerEditDialog, trying to add the edited trigger to a task definition fails to reflect the properties set by the TriggerEditDialog.
Dim MyTrigger As New TimeTrigger
Dim ls_Trigger_Window_Title As String = "Please Specify Trigger"
Dim triggerDlg As New TriggerEditDialog(MyTrigger, False) With { _
                .Text = ls_Trigger_Window_Title _
                }
If triggerDlg.ShowDialog() = vbOK Then
      td.Triggers.Add(MyTrigger)
End If
A trigger indeed gets added to the Task Definition (td) but it does not reflect the properties set in the Trigger Dialog.

Is there a special step we need to take in order to not lose the edited properties of a TimedTrigger once the TriggerEditDialog is closed?

Viewing all articles
Browse latest Browse all 2206

Trending Articles



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