Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
11
Erster Beitrag:
vor 2 Monaten, 4 Wochen
Letzter Beitrag:
vor 2 Monaten, 2 Wochen
Beteiligte Autoren:
André Labuschagné, ICI, Piet van Zanten, kingdr, Paulo Oliveira

WD21 - Timer

Startbeitrag von André Labuschagné am 13.09.2017 17:38

Hi All

A bit of a dumb question I guess. I am wanting to set a procedure to run at or soonest after a specific time every day. Any ideas?

Cheers
André

Antworten:

Andre

FYI: I have a daily batch WD19/22 programs running in background everyday by creating
a windows time schedule task of taskschd.msc with checking on
"Run whether user is looged on or not" and checked "Run with highest privileges"
and Configure for: Win7,Server 2008... with Trigger daily @ specific time.

And it works a charm.

HTH

King

von kingdr - am 13.09.2017 18:59
Hi King

Thanks for that. The only issue I have with it is the time will change for different sets of records. So I am going to need this thing up permanently and trigger the procedure every x minutes just to check the time itself and then act on the time for each set of records. Will have to write something that stores the completion of a trigger and then proceed. Was just hoping that there was an easier way - getting lazy here :-)

Cheers
André

von André Labuschagné - am 14.09.2017 04:41
Hi André,

For continuous checks I use a service.
It's quite easy to create one in WD.

Kind regards,
Piet

von Piet van Zanten - am 14.09.2017 11:09
Hi Piet

I do services as well in WD but how do you test for a procedure to trigger at a certain time every day without writing more code for this? Is there a setting somewhere?

André

von André Labuschagné - am 18.09.2017 12:15
If you are sure that your app is always running use one automatic procedure

https://doc.windev.com/en-US/?9000072

von Paulo Oliveira - am 18.09.2017 12:57
Hi Andre
You say you want to run procedure so I guess you have your application started.
So, I use something like this to start procedure when all other are sleeping and company PC's
are not in use. Application is started only on server and wait time and for me it is started only one time. To avoid to be started more times in this 1 hour I use bAlreadyStarted .

bAlreadyStarted is boolean
sVrijemeJe is string = Left(TimeSys(),4) //Time string
IF sVrijemeJe >= "2300" AND sVrijemeJe

von ICI - am 19.09.2017 06:35
Hi André,

If I understand correctly what you are trying to do I would have a service running, doing a check every 5 minutes or so.
In the procedure you get the time from each dataset and check if it has already past.
Then you do your procedure and flag it done.

Kind regards,
Piet

von Piet van Zanten - am 19.09.2017 10:50
Hi

Paulo - I can do that but it must only trigger at a specific time. I will be using that in combination with other code that determines if the procedure must be triggered.

ICI - excellent - that was pretty much where I was headed with a Timer checking every minute. I actually have dozens of procedures to be triggered so will write some code to discriminate on when they are triggered.

Piet - thanks that is what I will be doing. But will check more flags as the user actually decided when certain data will trigger the procedure and two sets may trigger at the same time.

Cheers
André

von André Labuschagné - am 20.09.2017 07:56
Hi ICI

Your code worked like a charm. Thanks a ton.

Cheers
André

von André Labuschagné - am 22.09.2017 09:57
I'm glad to help when I can and know how to help. :cheers:

von ICI - am 22.09.2017 13:34
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.