Something like the python 'schedule' module in MicroPython?
Posted: Sun Jul 31, 2022 5:58 pm
Something like the python 'schedule' module in MicroPython? The schedule module lets you schedule things in sync to the RTC, say have a task that runs at 0 seconds every minute for example.
Setting the onboard clock via a NTP query is straight forward, so that is the easy part. I guess if the schedule module functionality is not possible? I have not tried import it yet, since hoping someone here as a better approach?
I could setup a task that initially polls the RTC value, when it hits the matching criteria, then fires its true logic or calls another task, but that seems kinda of kludge? Or just recreates a type of like cron logic.
I did find MicroCRON Anyone have experience with it? Thoughts if so?
Setting the onboard clock via a NTP query is straight forward, so that is the easy part. I guess if the schedule module functionality is not possible? I have not tried import it yet, since hoping someone here as a better approach?
I could setup a task that initially polls the RTC value, when it hits the matching criteria, then fires its true logic or calls another task, but that seems kinda of kludge? Or just recreates a type of like cron logic.
I did find MicroCRON
Code: Select all
https://github.com/fizista/micropython-mcron