Django scheduled Tasks - Alternative to Cron or In

2020-04-20 08:11发布

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条回答
够拽才男人
2楼-- · 2020-04-20 08:44

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

查看更多
登录 后发表回答