recurring package¶
Module contents¶
Simple library for running a callable every N seconds
job(callable, seconds) will call callable every seconds seconds in a dedicated thread that is destroyed on program exit, or on calling job.terminate.
Attempting to start or modify the rate of a job that has been terminated will raise a RuntimeError
Example
import recurring j = recurring.job(some_callable, some_seconds) j.start() # … j.rate = some_new_seconds # … j.stop() # … j.start() # … j.terminate()