Django scheduled Tasks - Alternative to Cron or Independent Daemon

北城余情 提交于 2019-12-11 13:23:48

问题


In creating scheduled tasks I've used both Cron and a specially set up daemon for django.

Cron is silly-simple, and the daemon (in my opinion) might be excessive. The daemon set up an independent Django instance.

Django itself (If I'm not mistaken) runs as a daemon anyway, correct?

I'm wondering - how do you schedule tasks within the Django environment without leaving off from standard use?


回答1:


You can use Celery to run periodic tasks but depending on what are you trying to do it could be overkill.

If your use case it's simple, cron+management command it's way easier. You can use Kronos, django-cron or any of this libraries for this



来源:https://stackoverflow.com/questions/31126155/django-scheduled-tasks-alternative-to-cron-or-independent-daemon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!