Solved

Make a program come up at a time in the day

Posted on 2002-07-05
10
169 Views
Last Modified: 2012-05-04
How can I make my program come up at a time (e.g 12noon) during the day. Please I am not a programmer so make your answer as simple as possile
0
Comment
Question by:Tomide
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 22

Expert Comment

by:rspahitz
ID: 7132542
This is a scheduling issue and there are several ways to do it.

The easiest is to probably use the Microsoft scheduler to launch your application.  I think this can be done through Outlook if you have that.

Antoher way is to have you application running in background mode waiting for the desired time to arrive before it shows itself to the user.  This could be done by simply checking the system clock on a regular basis.

Yet another way is to create, in essence, your own scheduler application.  Start it up and have it launch the other application at the desired time.

Since you're "not a programmer" I don't know if that means that you don't want to do it through VB code...?

The third choice above could be done with a nice form that asks the user which application to run and at what time.  Then when a "Go" button is clicked, it starts a timer to check for that time and launches the app on schedule.

--
In each case, the scheduling application must be running prior to the desired launch time.
0
 
LVL 32

Expert Comment

by:bhess1
ID: 7132554
If you are using an NT based O/S (WinNt / 2000 / XP), you can use the AT command line utility to run the program at a given time.  

Open the command prompt, and type AT /? for a help screen on how to use AT
0
 

Author Comment

by:Tomide
ID: 7132603
rspahitz, I am using windows 2000, Please how can I use the Microsoft Schedular to Launch the application at 12noon.

I will prefare to do it through VB code so that it is in the program. Please can you explain the VB code very well. Not been a programmer means I am not that an expert in programing.
0
 
LVL 2

Expert Comment

by:yongyih
ID: 7133231
How about create a VB program which the form is hidden at first..
Then your program has a timer to check the time.  when the time is 12noon, then set the form visible to true.

0
 
LVL 2

Accepted Solution

by:
yongyih earned 50 total points
ID: 7133235
Or you can create a VB program that minimize in system tray, like the time in Windows 2000.  This is a better way but need more coding.

The checking part will still the same.  You need a timer in your form.. lets say set the interval to 1000 (check every second)

inside your timer, add this code:

If Hour(Time) = 12 Then
  If Me.Visible = False Then
    Me.Visible = True
  End If
End If
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 2

Expert Comment

by:priya_pbk
ID: 7133430
hi Tomide,

Since you have Windows 2000 installed, you can run your application program at 12.00 everyday. You can try this way. I will try to be as descriptive as possible. Here it is..


Go to your Start Menu(leftmost corner, ie if you did'nt know)
Choose Control Panel,and click "Scheduled Tasks". This will open the scheduled tasks. Right click on the screen and select "New"->"Schedule Task", give it an appropriate name.

After this right click on that task, and choose properties.
In that window, choose browse to choose your VB application which you want to run everyday at 12.00 noon.

Then click the Schedule tab in the properties window and choose the appropriate things, like you want daily(everyday including Sat and Sunday) or weekly(everyday "excluding" Saturday and Sunday). Change your start time to 12.00 and see the advanced button if you want to repeat the task every 5 mts or so, or whatever.

I think you wont require this, since you will be running only once at 12.00.

I think this will make your VB program to run at 12 everyday and you dont have to check in VB application by putting a timer or anything.

Hope this helps..

-priya













0
 
LVL 2

Expert Comment

by:priya_pbk
ID: 7133443
Also you can click the "Add Scheduled Tasks" in the Scheduled task window which will also open a 'Scheduled Tasks Wizard'. It will guide you how to do it. Just set all the necessary things liek browse for your file and set the time to 12.00 noon daily.

-priya

0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7138498
Tomide, priya_pbk's Win2000 instructions seem to cover it really well.
0
 

Author Comment

by:Tomide
ID: 7153464
This is Timer code worked very well i did not have to go into the Task manager to solve it. I just added the code and made my program to run underground so it comes up at a time during the day.

Thanks mate
0
 
LVL 2

Expert Comment

by:priya_pbk
ID: 7153481
So does'nt that mean, your progam is running 24 hrs a day and 365 days a year..is it ok for you that way? just wondering????? why waste so much resources, just a thought!!

-priya
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now