[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Firing off an event

Posted on 1999-07-14
6
Medium Priority
?
136 Views
Last Modified: 2010-05-02
I have a backup program I wrote with VB and need help on how to set it off on Sunday's at 6:00 pm.  I thought about the timer but don't see how the timer will trap the 6:00 pm.  Any help you could give would be appreciated.
Thank you.
0
Comment
Question by:Hush
  • 3
  • 3
6 Comments
 
LVL 1

Expert Comment

by:Jaysin28
ID: 1524755
the timer wouldn't help anyway unless the computer running your program

1 - Stayed on 24 hours a day, 7 days a week
2 - Your program was never shutdown.

I would think about setting task scheduler to run your program on Sunday's at 6:00pm or your program will need to be a Terminant-Stay Resident program.
0
 
LVL 2

Accepted Solution

by:
BeedleGuis earned 300 total points
ID: 1524756
the simplist way would be to use a timer set to go every minute then just do
If format(now, "dddd") = "Sunday" and format(now,"Hh:Nn:Ss") >= 6:00:00 and format(now,"Hh:Nn:Ss") <= 6:00:59 then

'Backup
End if
0
 
LVL 1

Expert Comment

by:Jaysin28
ID: 1524757
BeedleGuis,

Your answer would work assuming the conditions that I have outlined in my comment have been met.

0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1524758
Jaysin is right . . If your not going to leave your program running all the time.  If you are running 24/7 then my code should fire once every Sunday at 6:00.  Oops  change those 6's to 18's, otherwise it'll go in the morning, Also make sure the timer interval is set to 60000, or it might miss it, or it might run it twice.
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1524759
Jaysin . .one of these times our comments are going to collide and down the server .. :-)
0
 
LVL 1

Expert Comment

by:Jaysin28
ID: 1524760
I know.... I have answered a few questions yesterday and before my screen updated, you had submitted an answer.  

i.e.  The coment on the question about Object Type.

Jaysin
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

591 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