This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Action scheduler

Hello,

I am currently exploring the possibilities on how to solve this task:
I need to create a scheduler which would be able to schedule a task or an action for a long period (hours, days) e.g. "task must be started after 10 days from now", hence my concern is the timing implementation.

If I decided to use RTX, is there any provided OS functionality I could leverage? I reckon RTX os_tmr_create and os_dly_wait are not meant for this.

Thank you!

G.

Parents Reply Children
  • Maybe I was trying to provoke Steve?

    Let's just face it. I don't like sloppy posts, you (nearly) always produce a sloppy post that you have to swiftly correct. So, (nearly) any post you make will be something that I dislike.

  • Thank you guys!

    Hm, also there's another idea - to use RTC. Basically the principle would be to store deadlines & functions in an array and then recheck the whole list every second and execute any function which is deadline >= clock.

    Will spend some time on evaluation.

    Thanks again!

  • Well, the RTC or a timer is still just a variant of a "ticker". You still need to write code that compares the passing time with a (possibly sorted) list of actions and see when it is time to handle them.

    Just that a RTC is normally serviced by an ISR - do you want the ISR to scan that list? It is normally better to have a task do it, too keep a minimum of time spent in interrupt handlers.