Reputation: 39
I want to send monthly notifications to users that log on to my website. I've thought of using Sendgrid's Marketing campaigns to send monthly mails but it doesn't fit perfectly to my needs. I'll have to keep adding emails to the automation at a month's duration and that doesn't seem the right way to do it.
Upvotes: 0
Views: 155
Reputation:
Use Celery.
from celery.schedules import crontab
def setup_periodic_tasks(app):
app.conf.beat_schedule = {
'monthly-email': {
'task': '[APP NAME].tasks.[FUNCTION NAME]',
'schedule':
},
https://docs.celeryproject.org/en/stable/userguide/periodic-tasks.html#crontab-schedules
Upvotes: 1