Scheduler Precise repeat

Home Forums kbmMW Scheduler Precise repeat

Viewing 5 reply threads
  • Author
    Posts
    • #57532
      chmichael
      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
      chmichael
      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
      chmichael
      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

      • This reply was modified 1 month ago by chmichael.
      • #57550
        chmichael
        Participant

        Well it didn’t work for long …

    • #57545
      chmichael
      Participant

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

    • #57564
      chmichael
      Participant

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

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