Solved

Running a procedure at set times?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PDF library for Delphi 2 104
Delphi application Soap connection 5 96
Create Database on Android via Delphi dbExpress 3 79
Delphi IDE crash without error message ... 7 76
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

911 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

19 Experts available now in Live!

Get 1:1 Help Now