?
Solved

Firing off an event

Posted on 1999-07-14
6
Medium Priority
?
135 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
[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
  • 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
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!

 
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

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

719 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