Solved

Make a program come up at a time in the day

Posted on 2002-07-05
10
171 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

803 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