Make a program come up at a time in the day

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
Who is Participating?

Improve company productivity with a Business Account.Sign Up

yongyihConnect With a Mentor Commented:
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
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.
Brendt HessSenior DBACommented:
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

TomideAuthor Commented:
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.
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.

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..


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.


Tomide, priya_pbk's Win2000 instructions seem to cover it really well.
TomideAuthor Commented:
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
So does'nt that mean, your progam is running 24 hrs a day and 365 days a it ok for you that way? just wondering????? why waste so much resources, just a thought!!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.