Something like the python 'schedule' module in MicroPython?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Jibun no kage
Posts: 144
Joined: Mon Jul 25, 2022 9:45 pm

Something like the python 'schedule' module in MicroPython?

Post by Jibun no kage » 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

Code: Select all

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

User avatar
scruss
Posts: 360
Joined: Sat Aug 12, 2017 2:27 pm
Location: Toronto, Canada
Contact:

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

Post by scruss » Mon Aug 01, 2022 1:27 am

There is rguillon/schedule but I found it mired in dependency hell. You might have more incentive to work out what's wrong

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

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

Post by pythoncoder » Mon Aug 01, 2022 4:37 pm

Peter Hinch
Index to my micropython libraries.

Post Reply