tinysched

Easily execute code repeatedly in background


License
MIT
Install
pip install tinysched==0.1.2

Documentation

tinysched

This library provides a simple, dependency-free interface to run a single function in the background, repeatedly, at a specified interval. The function invocations are serial, and executed in a single thread.

It's really just a little extension for the built-in sched module.

CircleCI PyPi Maintainability License

Installation

pip install tinysched

Usage

from tinysched import scheduler
from datetime import timedelta


def foo():
    print('foo!')


cancel_fn = scheduler.repeat(foo, interval=timedelta(seconds=0.1), max_repeats=10)

# manually cancel!
cancel_fn()