Link to home
Start Free TrialLog in
Avatar of stephenlecomptejr
stephenlecomptejrFlag for United States of America

asked on

I need to backup several files at a specific time - need help with creating a VB.NET program with a timer?

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

End Sub
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

why don't you use the scheduler to launch your task?
Avatar of stephenlecomptejr

ASKER

What is the scheduler that you are talking about?  Is that a component?
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Its listed as Scheduled Tasks.

As many times as I've gone into Control Panel - I've never noticed it or tried to use it before.

Thank you very much!