I have an VB app.
the App run a general function "GenFunction"
"GenFunction" call other functions to complete tasks.
say like the GenFunction take about 3-5 minutes to finish.
now, I want to run the GenFunction every 5 minutes exact.
1. how to run the GenFunction every 5 minutes.
2. what if the previous Genfunction call longer than 5 minutes and the next call is about to start? how to avoid this?
I can't make the interval duration longer, 'cause I don't know how long the previous call will actually take.
I want to have the flexibility to run the second call after the previous one is done.
if 1st call is < 5 min, run 2nd in 5 min.
if 1st call is > 5 min, run 2nd after the 1st is done.
am I asking too much, or it is just very simple to do?