This project has moved. For the latest updates, please go here.

example for updating trigger

Feb 23, 2012 at 2:11 AM

Hi all,

I'm trying to enable/disable a specific trigger for one task. Does anybody have an example how to do this?

TIA

Coordinator
Feb 23, 2012 at 6:12 AM
using (TaskService ts = new TaskService())
{
   Task t = ts.GetTask(taskName);
   td = t.Definition;
   td.Triggers[0].Enabled = false;
   t.RegisterChanges();
}
Feb 23, 2012 at 1:32 PM

thanks.