Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 1 Jahr, 1 Monat
Letzter Beitrag:
vor 1 Jahr, 1 Monat
Beteiligte Autoren:
Ericus, Fabrice Harari, Christoph Erdmann

[WD19]Automated Procedure

Startbeitrag von Ericus am 11.05.2017 09: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

Antworten:

Hallo Ericus,

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

Christoph

von Christoph Erdmann - am 11.05.2017 11:45
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

von Fabrice Harari - am 11.05.2017 12:38
Thanks Fabrice

That will do the trick.

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

Regards

von Ericus - am 11.05.2017 12:40
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.