Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们将 Django 框架与 Mandrill 一起使用。该应用程序托管在 Heroku 上。每当将电子邮件发送到特定地址时,我们都需要在数据库中创建一个新对象。我假设我需要编写一个脚本以在每次收到新电子邮件时触发或每 5-10 分钟检查一次邮箱。
有人做过这样的事吗?如何设置这样的脚本?我怎样才能在 Heroku 中做到这一点?谢谢!
要触发及时脚本,请使用 CRON。django kronos 是使用它的简单选择。kronos 有一个很好的教程。
https://pypi.python.org/pypi/django-kronos