1st Day of Every Month

Feb 2, 2011 at 1:40 AM

How do you create a schedule for the first day of every month with TaskScheduler.MonthlyTrigger?

Coordinator
Feb 2, 2011 at 5:18 AM

The default constructor for MonthlyTrigger does just that.

td.Triggers.Add(new MonthlyTrigger());
Sep 7, 2012 at 3:07 AM

Is MonthlyTrigger() no longer a valid constructor?  It appears MonthlyTrigger(int dayOfMonth, MonthsOfTheYear monthsOfYear) is the only valid constructor now.

Coordinator
Sep 7, 2012 at 1:53 PM

The default constructor overlapped with the other that has default parameters so the default was removed. It will still work though to just create one as in the example above. You will get a trigger for the 1st day of the month, every month of the year.