2
我想弄清楚如何自動發送適當任務的電子郵件通知。如何自動發送電子郵件作爲提醒
我有一個任務的到期日期,我希望它在指定的日期發送它,但在它到期前1小時。
I'have了創建自定義命令
notify.py
class Command(BaseCommand):
help = 'Email notification'
def handle(self, *args, **options):
Job.generate_emails()
models.py
@classmethod
def generate_emails(cls):
pass
這就是I'have迄今所做。
使用芹菜。 http://celery.readthedocs.org/en/latest/ – ruddra
我會建議https://github.com/arteria/django-background-tasks – taesu