Skip to content
This repository was archived by the owner on Oct 17, 2018. It is now read-only.

Repository files navigation

Donkey [WIP]

Build Status

A simple cron-like library for executing scheduled jobs.

Donkey is inspired by Cron.

fromdatetimeimportdatetimefromdonkeyimportJobQueue, Workerq=JobQueue()
@q.job(3)defthis_job_runs_every_3_seconds():
print('Fuzz', datetime.now())
@q.job(5)defthis_job_runs_every_5_seconds():
print('Buzz', datetime.now())
Worker().run(q)
# Fuzz 2015-02-03 16:41:01.408136# Buzz 2015-02-03 16:41:03.404123# Fuzz 2015-02-03 16:41:04.406813# Fuzz 2015-02-03 16:41:07.408426# Buzz 2015-02-03 16:41:08.406851# Fuzz 2015-02-03 16:41:10.408415# Fuzz 2015-02-03 16:41:13.403260# Buzz 2015-02-03 16:41:13.403319

TODO

  • tests.
  • add jobs at run time.
  • job states & stats (see rq).
  • other backend (namely thread, stackless) support.

License

MIT

About

A simple cron-like library for executing scheduled jobs.

Resources

Stars

21 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages