views:

267

answers:

2

I just saw this question and one of the answers looks really appealing to me, but I have no idea where the classes come from.

What assembly can I find the DailyTrigger and ScheduledTasks class?

What namespace are they in?

Are they only useful for the Windows Scheduled Tasks located in the Control Panel?

Is there any other useful information about them that I should know?

Code I'm referring to:

Trigger tg = new DailyTrigger();
ScheduledTasks st = new ScheduledTasks();
Task t = st.OpenTask("foo");
t.Triggers.Add(tg);
t.Save();
+1  A: 

See the DailyTrigger reference on MSDN. It is a part of the Windows Task Scheduler:

The Task Scheduler enables you to automatically perform routine tasks on a chosen computer. The Task Scheduler does this by monitoring whatever criteria you choose to initiate the tasks (referred to as triggers) and then executing the tasks when the criteria is met.

David Schmitt
+1  A: 

This is from a CodeProject.com project: www.codeproject.com /KB/cs/tsnewlib.aspx

This is a .NET class that uses the built in TaskScheduler service in Windows.

Also look at weblogs.asp.net /jguadagno/archive/2008/10/15/new-open-source-application-net-task-service.aspx or Quartz.NET ( quartznet.sourceforge.net )for other scheduling services.