Scheduler Precise repeat

Home Forums kbmMW Scheduler Precise repeat

Viewing 6 reply threads
  • Author
    Posts
    • #57532
      Babis Michael
      Participant

      Hello,
      The below code doesn’t repeat every 3 seconds while if i remove the “precise” it works.
      Thank you

      FConnectEvent := Scheduler.Schedule(ConnectEvent).Precise.EverySecond(3).
      QueuedAfterRun(procedure(const Task: IkbmMWScheduledEvent)
      begin
      // Do Something
      end).
      WhenException(procedure(const AException: Exception)
      begin
      // Do Something
      end).Activate;

    • #57533
      TomYU
      Participant

      This problem does exist and we look forward to resolving it as soon as possible. Additionally, I have encountered issues with calling the Activate method.
      When switching to Activate, Activate=True and the schedule is not executed.

    • #57538
      Babis Michael
      Participant

      Actually the Precise Thread Interval Starts but if you deactivate the Event and Reactivate it doesn’t work. So the problem is on the 2nd time you activate the precise event/schedule.

    • #57543
      Babis Michael
      Participant

      It seems i found a workaround … just activate/deactivate 2 times

      eg.
      MyEvent.Active := False;
      MyEvent.Active := True;
      MyEvent.Active := False;
      MyEvent.Active := True;

      Now the interval will work

      I sent a sample project to Kim

    • #57545
      Babis Michael
      Participant

      Seems it’s choosing wrong (active) thread from the thread pool … might be wrong

    • #57564
      Babis Michael
      Participant

      Well i’ve created my own thread timer as workaround until Kim fixes the “Activation” bug of kbmMWScheduler.

    • #57584
      TomYU
      Participant

      …..

Viewing 6 reply threads
  • You must be logged in to reply to this topic.