As part of Windows Service I created, I am using Timers to trigger functions every few minutes. However I want to rather trigger these functions at specific intervals inside an hour.
User Configs will determine the intervals.
Example
- Every 10th minute call SendData() eg (2:10, 2:20, 2:30, 2:40 etc)
- Every 55th minute call LoadData() eg (2:55, 3:55, 4:55, 6:55 etc)
So based on the above, when the Service starts up at 2:03 it needs to esnure that the first SendData will happen at 2:10 and the first LoadData will happen at 2:55.
Also while for example SendData is running, the timer will be paused to ensure that SendData is completed before the interval. Meaning that if SendData starts at 2:10 and takes 15 minutes, the next trigger will be 2:30.