Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bcho/donkey
A simple cron-like library for executing scheduled jobs.
https://github.com/bcho/donkey
Last synced: 24 days ago
JSON representation
A simple cron-like library for executing scheduled jobs.
- Host: GitHub
- URL: https://github.com/bcho/donkey
- Owner: bcho
- License: mit
- Archived: true
- Created: 2015-02-03T08:49:07.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-27T07:44:07.000Z (over 9 years ago)
- Last Synced: 2024-04-23T23:38:07.008Z (8 months ago)
- Language: Python
- Size: 107 KB
- Stars: 20
- Watchers: 7
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
- starred-awesome - donkey - A simple cron-like library for executing scheduled jobs. (Python)
README
# Donkey [WIP]
[![Build Status](https://travis-ci.org/bcho/donkey.svg)](https://travis-ci.org/bcho/donkey)
A simple cron-like library for executing scheduled jobs.
Donkey is inspired by [Cron][cron-go].
[cron-go]: https://github.com/robfig/cron
```python
from datetime import datetime
from donkey import JobQueue, Workerq = JobQueue()
@q.job(3)
def this_job_runs_every_3_seconds():
print('Fuzz', datetime.now())@q.job(5)
def this_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
- [x] tests.
- [ ] add jobs at run time.
- [ ] job states & stats (see [rq][rq]).
- [ ] other backend (namely `thread`, `stackless`) support.[rq]: http://python-rq.org/
## License
[MIT](LICENSE)