I need to backup several files at a specific time - need help with creating a VB.NET program with a timer?
Posted on 2007-04-09
I need help creating a VB.Net 2003 form that runs in the background - every now and then checks the desktop time to see if 11:00 p.m. and if so then run a function that backups several files in an Access database. I already know how I want to create my function and I've develop programs in Visual Basic 6 before but I acknowledge VB.NET is different. I'm thinking that I need to add a timer that (of which I've done already with an interval of 6000) but unsure the exact length of time that will entail or how to check that if say the time is past 11:00 p.m. when the timer is fired? I think that the interval 6000 would slow other processes down since this will be a program running in the background and I don't want it to slow down any other processes I have running at the same time. Basically the code to get me started is pasted below:
Private Sub tmrCheckTime_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles tmrCheckTime.Elapsed