Solved

Running a procedure at set times?

Posted on 1997-10-13
3
171 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
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

DevOps Toolchain Recommendations

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

Question has a verified solution.

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

Suggested Solutions

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 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