I work on a page in Django, where users can set custom reminders for different dates (max. 3 per date). The reminders should send via e-mail. Its similar to Google Calendar, where you can set multiple reminders for each event in x-minutes, x-hour or x-days before the date starts. I wonder, how I can solve it combined with Django. Since there will be a lot of users and dates, which should of course also run perfomant. Should I do this with a cron job? Is there a python way?
问问题
2532 次
2 回答
6
另一种传统方式是使用 django-celery: http: //pypi.python.org/pypi/django-celery/
您可以使用celerybeat命令运行定期任务。您也可以从 django 视图开始挂起的任务。
于 2012-12-26T17:02:48.090 回答
2
您可以使用 cron 作业。要创建管理命令:请参阅此处的文档
此外,您可以将电子邮件生成创建为基于队列的分布式实现,以提高性能。您也可以使用Django-mailer应用程序。
于 2012-12-26T16:48:38.253 回答