I’m trying to run my task immediately, then to run it by time interval.
I wrote the following :
var syncMailObservable = Observable.Interval(TimeSpan.FromSeconds(15));
syncMailObservable.Subscribe(s => MyTask());
The problem is the task starts only after the 15 seconds. I need to run my task at the beginning then to continue by time interval.
How would I do that?
You could do this: