T Hoecherl
asked on
Setting a timer to run on the hour
I have a vb.net program that runs and accomplishes several tasks every 60 minutes. I am satisfied with how it is working, but it runs every hour from the time I launch the application. If I launch the application at 8:50 am, it runs then and again at 9:50, etc. I would like it to run at 9:00, 10:00, etc. Is there a way to accomplish this with VB.net?
Every second would be a bit extreme. I would set it to every minute.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect, Idle_Mind. Thank you.
T
T
In the code, write this:
Private Sub Timer1_Timer(sender As Object, e As System.EventArgs)
If Date.Now.ToString("HH:mm:s
'Start the Task
End If
End Sub
Hope that helps.