Page 1 of 1

Something like the python 'schedule' module in MicroPython?

Posted: Sun Jul 31, 2022 5:58 pm
by Jibun no kage
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

Code: Select all

https://github.com/fizista/micropython-mcron
Anyone have experience with it? Thoughts if so?

Re: Something like the python 'schedule' module in MicroPython?

Posted: Mon Aug 01, 2022 1:27 am
by scruss
There is rguillon/schedule but I found it mired in dependency hell. You might have more incentive to work out what's wrong

Re: Something like the python 'schedule' module in MicroPython?

Posted: Mon Aug 01, 2022 4:37 pm
by pythoncoder