Tasksheduler в .NET
Привет,
I download the dll file from http://taskscheduler.codeplex.com/. i also add reference Imports Microsoft.Win32.TaskScheduler
What i want is Weekly basis Monday, tuesday and wed at around 11:00 AM this sheduler fire. How to do this.
Спасибо
Басит.
Что я уже пробовал:
Ниже приведен код, работающий нормально.
Private Shared Sub Main() Using ts As New TaskService() ' Create a new task definition and assign properties Dim td As TaskDefinition = ts.NewTask() td.RegistrationInfo.Description = "Does something" td.Principal.LogonType = TaskLogonType.InteractiveToken ' Add a trigger that will fire the task at this time every other day Dim dt As DailyTrigger = DirectCast(td.Triggers.Add(New DailyTrigger(2)), DailyTrigger) dt.Repetition.Duration = TimeSpan.FromMinutes(1) dt.Repetition.Interval = TimeSpan.FromMinutes(1) Const taskName As String = "Test" ts.RootFolder.RegisterTaskDefinition(taskName, td) End Using End Sub