I'm setting up a timer for my windows services with a following settings: The timer will start after 10 days, and has a multiplier of 3 i.e. It'll run again after 10*3 = 30 days, and then 30*3 = 90. This timer should stop after 180 days. I'm trying to achieve this in such a way that we calculate the time closest in the future, and just chill out until that time comes, fire the requests you need to fire and then figure out the next closest time again.
So far I've only tried setting up the timer as follows. but lost on the multiplier part.
private readonly Timer _timer
_timer.Interval = TimeSpan.FromDays(10).TotalMilliseconds;
_timer.Elapsed += DoWork;
_timer.Start();
// Setup timer to do work
private void DoWork(){}