Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

New Post: Last Day of Month Only

$
0
0
new MonthlyTrigger(1, this.Trigger.Months) { DaysOfMonth = new int[0], RunOnLastDayOfMonth = true };

I know that seems unintuitive, but it works. Effectively you are allowing the constructor to set the DaysOfMonth to a value (1 in this code) and then undoing it by setting it to an empty array. I made the change because I had other users that were using the default constructor and it was failing to register. Their argument was that a default constructor should never cause code to break and I agreed.


Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>