Sudantha
Sudantha

Reputation: 16194

scheduled execution of a function every 20 mins

I need to run a function scheduled execution every 20 minutes when the application is running.

How can this be done?

Upvotes: 0

Views: 258

Answers (1)

Zakaria
Zakaria

Reputation: 15070

What if you created a timer?

You set the property enabled to true, set the interval to 72000000 (which is 20 min in ms).

Then, in your code:

Private Sub Timer1_Tick(ByVal sender As System.Object,ByVal e As System.EventArgs)
 // Put here the code portion you want
End Sub

Upvotes: 1

Related Questions