Solved

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
4
152 Views
Last Modified: 2013-11-26
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
0
Comment
Question by:stephenlecomptejr
  • 2
  • 2
4 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 18877451
why don't you use the scheduler to launch your task?
0
 
LVL 1

Author Comment

by:stephenlecomptejr
ID: 18877744
What is the scheduler that you are talking about?  Is that a component?
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 18877906
The Windows Scheduler (look in your control panel to find it). You can run jobs from there. Your application does not need to take care of what time is it and so. It only has to focus on its own task.
0
 
LVL 1

Author Comment

by:stephenlecomptejr
ID: 18878258
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!
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question