python 的企业调度程序(如quartz)
我正在寻找一个适用于Python的企业任务调度程序,就像Quartz适用于Java一样。 要求:
- 持久性:如果进程重新启动或机器重新启动,那么所有作业都必须保留在那里,并且必须在重新启动后被解雇。
- 作业必须在事务中进入和退出调度程序(即,如果在与调度程序无关的数据库中某些数据库操作失败,则作业不得退出或进入调度程序)。
- 可扩展性。取决于项目成功的衡量标准,但我更愿意从一开始就知道我不是从死胡同开始的。
- 可配置性:任务到期时,可以同时触发多少个任务等。
有什么建议吗?是否有特定于 python 的东西,或者是否有可能(甚至很好)从 python 接口到 Quartz。
I am looking for an enterprise tasks scheduler for python, like quartz is for Java.
Requirements:
- Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and must be fired after restarting.
- Jobs must enter and exit the scheduler in a transaction (i.e. if some database operation fail, in a database unrelated to the scheduler, then the job must not have exited or entered the scheduler).
- Scalability. Depends on the measure of success of the project, but I would prefer to know from the beggining that I am not starting from a dead end.
- Configurability: when tasks expire, how many can be fired simultaneously, etc.
Any recommendations? Is there something python specific, or is it possible (or even good) to interface to Quartz from python.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
APScheduler 是您要找的吗?
Is APScheduler what you're looking for?
您可以使用 Celery
使用
pip install celery
安装 Celery另一种选择是使用 RQ。
使用
pip install rq
安装。You can use Celery
Install Celery using
pip install celery
Another option is using RQ.
Install using
pip install rq
.我们正在使用Sun Grid Engine,可通过 DRMAA,它恰好具有 Python 绑定。
We're using Sun Grid Engine, which is accessible through DRMAA, which happens to have Python bindings.
这个项目看起来还不错。一个灵活的 python 库,用于构建您自己的类似 cron 的系统来安排作业,即运行一个龙卷风进程来服务 REST API 和 Web UI。
https://github.com/Nextdoor/ndscheduler
This project seems not bad. a flexible python library for building your own cron-like system to schedule jobs, which is to run a tornado process to serve REST APIs and a web ui.
https://github.com/Nextdoor/ndscheduler