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
162 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

622 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