rguillon / schedule

Python job scheduling for humans.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

schedule

MicroPython job scheduling for humans.

A micronized port of <https://github.com/dbader/schedule>

The implementation uses timestamps and time tuple instead of datetime, saving a few kilobytes of RAM.

Usage

$ micropython -m upip install micropython-schedule
import schedule
import time

def job():
    print("I'm working...")

schedule.every(10).minutes.do(job)
schedule.every().hour.do(job)
schedule.every().day.at("10:30").do(job)
schedule.every().monday.do(job)
schedule.every().wednesday.at("13:15").do(job)

while True:
    schedule.run_pending()
    time.sleep(1)

Meta

Renaud Guillon - - renaud.guillon@gmail.com

Distributed under the MIT license. See LICENSE.txt for more information.

https://github.com/rguillon/schedule

About

Python job scheduling for humans.

License:MIT License


Languages

Language:Python 100.0%