title: Run Method in TaskService C# ?
body: <p>I want to execute a function in given date just once and i'm done with the <code>Task</code>.
  What should i do?</p>
  
  <pre><code>static void Main(string[] args)
  {
      DateTime date = GetExecuteTime();        
      using (TaskService ts = new TaskService())
      {
          // Create a new task definition and assign properties
          TaskDefinition td = ts.NewTask();
  
          td.RegistrationInfo.Description = "run method";
  
          TimeTrigger d = new TimeTrigger();
          d.StartBoundary = date;
  
          td.Triggers.Add(d);
  
          //td.Actions.Add();
      }
  
      Console.ReadKey(true);
  }
  </code></pre>