I have created a windows form in Visual Studio,
I want to be able to run a scheduled task using the users selected value from the dateTimePicker.
So once the user has selected the date and time they wish the .exe to run, I need this to be set as a scheduled task.
I have reaserched how to run windows scheduler programatically and found that there is options using Taskscheduler but I am using 3.5 and this assembly is not available?
Is there a way I can do this?
Thanks in advance.
The
TaskSchedulerclass is part of theSystem.Threading.Tasksnamespace. You have to reference it first by doing ausing System.Threading.Tasks;in your class.You can then refer to these sample codes on how to use the
TaskScheduler.