Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2003-02-20
5
Medium Priority
?
174 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
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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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, 6 hours left to enroll

571 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