PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD19]Automated Procedure
[WD19]Automated Procedure
Iniciado por guest, 11,may. 2017 11:50 - 3 respuestas
Publicado el 11,mayo 2017 - 11:50
Good day

I use the automated procedure mechanism in Windev to run a process every 10 minutes. However, I am not sure if, once the process is started, it will finish within 10 minutes. Sometimes it might, other times it might not.

How can I run the automated procedure as regularly as possible but only once the previous procedure is finished.

Thanks in advance for any assistance.



Ericus Steyn
Publicado el 11,mayo 2017 - 13:45
Hallo Ericus,

look in the help for SEMAPHORE. I think, this can do this.

Christoph
Publicado el 11,mayo 2017 - 14:38
Hi Ericus,

it depends of what you mean by " as regularly as possible but only once the previous procedure is finished."

if your process runs for 12 mn, should the next one start at 12+10 or immediately?

Anyway, the way I'm doing that is as follow:
- instead of using a 10mn timer, I'm using a 10 seconds timer
- I declare a global boolean bAlreadyInProcess, set at false by default
- in my timer code, I do
if bAlreadyInProcess=true then
return
else
IF TIME CONDITION is true (that's where the question above comes into play) then
bAlreadyInProcess=true
----
real process here
----
balreadyinProcess=False
end
end

And that's it...
This system also allows me to start multiple processes with different time interval settings from inside ONE timer

Best regards
Publicado el 11,mayo 2017 - 14:40
Thanks Fabrice

That will do the trick.

I'm normally so sharp don't know why I missed that.

Regards