Solved

Running a procedure at set times?

Posted on 1997-10-13
3
180 Views
Last Modified: 2010-04-04
I need to run several procedures at set times every day or on certain days of the week. What i need to know is what component/functions i can use to achieve this eg.
how will i run a procedure at seven 'o clock every morning?
0
Comment
Question by:naickers2
[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 Comments
 
LVL 3

Expert Comment

by:mirek071497
ID: 1347381
In Windows NT you can use scheduling jobs, but in Windows95 you must write simple scheduler. However we must know more. especially Delphi Version and Windows Version.
Here are the second question named "scheduling system" which is about the same problem. Sasas give comment to this question :
"Look for the Delphi Super Page at www.suncite.icm.edu.pl"

This is really good start point, so try and ask what you need more.
0
 

Accepted Solution

by:
AllenC earned 100 total points
ID: 1347382
procedure TForm1.Timer1Timer(Sender: TObject);
var
  Present : TDateTime;
  Hour, Min, Sec, MSec : Word;
begin
  Timer1.Interval := 60000;  { Check for time every 60 seconds }
  Present := Now;
  DecodeTime(Present, Hour, Min, Sec, MSec);
  If (Hour = 7) and (Min = 0) then
   begin
     { Do the job }
   end;
end;

You should also use the trayicon component to "hide" or minize your program.

P.S. this is not the best way to do it, but it works.
0
 

Author Comment

by:naickers2
ID: 1347383
Thanx for the help. This is exactly what i need.
0

Featured Post

Independent Software Vendors: 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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 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