Mike,
Is this "update executable" a Delphi App you developed ?
If so, why not convert it into a Windows Service which has (in effect) an
infinite loop
while NOT terminated do
begin
Get Time
if time in limits
begin
Setup DB connections, etc
Process Updates
Close connections and cleanup
end
wait one minute
end
this way, it doesn't matter how long the update process takes, you will not
get overlaps, etc
AND
(as a service runs in the background) has the added feature that it does not
require a user to be logged in, hence more secure
We always use services for all "server" and "housekeeping" functionality -
much more secure and reliable
Regards,
Brian
--------------------------------------------------
From: "SoftTech" <[email protected]>
Sent: Monday, May 17, 2010 10:08 PM
To: "Delphi - Talk" <[email protected]>
Subject: Question on Windows Task Scheduler and Delphi
Greetings,
I use Delphi 5.1 and Delphi Studio 2010.
Currently I use the windows task manager on our office server to run an
executable that updates transactions in a database to move things
forward. It starts running at 12:10am and processes every 8 minutes for 6
hours.
I have a few issues with this I wanted to know if anyone using Delphi
could
help me with.
First off the update that this executable does could complete as soon as 4
minutes and shut down and then have to wait an additional 4 minutes before
the task is scheduled to start again.
Q1: Does anyone know of any Delphi code or component set that can
determine
that the task has completed early and automatically start it again sooner
than waiting to start it every 8 minutes?
Sometime, an error is reported "Out of Memory" (Even though these is
plenty
of memory) and my executable will stop. It takes a user to close down the
executable and then manually restart the executable if the 6 hours has
expired, otherwise the task scheduler would pick up and continue
processing.
Q2: Does anyone know of any way (Code or component) to detect that an
executable has stopped responding or after a predefined amount of time,
say
8 minutes, close it, then restart the task again?
Q3: Does anyone know of any way (Code or component) to detect that a task
is
currently running? And if so how long it's been running?
Thanks,
Mike
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.819 / Virus Database: 271.1.1/2880 - Release Date: 05/18/10
04:26:00
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk