?
Solved

Using VB Timer to set an script to run at Particular Time

Posted on 2003-02-20
5
Medium Priority
?
170 Views
Last Modified: 2010-04-07
Hi guys,

Could someone guide me how to use Timer to set a particular script to run at particular time...

let's i wan ABC script (database back up script) to run at every friday  on 10 pm....

pls guide me how to set the timer...thank you
0
Comment
Question by:cykerk
[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
5 Comments
 
LVL 3

Accepted Solution

by:
Drizzt95 earned 200 total points
ID: 7992075
Your better off using the windows scheduler.
If you use the standard vb timer it will use up too many resources on your pc.

If you want I do have a script that uses the windows timer event and uses almost no resources but the scheduler is still the easiest way.
0
 

Expert Comment

by:WarLord
ID: 7996436
create 2 textboxes text1 and text2, then create a timer
called timer1

set the interval of the timer to 100

and place this code in your form

Private Sub Timer1_Timer()
Text1.Text = Format(Time, "hh:mm:ss AMPM")
If Text1.Text = "10:00:00 PM" Then
Select Case Weekday(Date)
Case vbSaturday
shell "start placethenameofyourscripthere"
End Select
End If
End Sub

this should work

Greetings Erik


0
 

Expert Comment

by:WarLord
ID: 7996443
ehm

change Case vbSaturday to Case vbfriday sorry my mistake
0
 

Expert Comment

by:CleanupPing
ID: 8901340
cykerk:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8964004
Moderator, my recommended disposition is:

    Accept Drizzt95's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Independent Software Vendors: 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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 21 hours left to enroll

770 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