Closed rakshitharam closed 3 years ago
// Instantiate a daily trigger that runs every day
var dt = new DailyTrigger(1);
// Starting today at 11pm
dt.StartBoundary = DateTime.Today.AddHours(23);
// Set the repetition to run every 30 mins for 2 hrs without a forced stop at the 2 hr mark
dt.SetRepetition(TimeSpan.FromMinutes(30), TimeSpan.FromHours(2), false);
// Create task with trigger
TaskService.Instance.AddTask("MyTask", dt, new ExecAction("yourexehere.exe"));
Please add an example for Trigger.Repetition Property.
I want to set up two scheduled tasks:
Please give an example to show how this repetition can be set up