B
B
Bjornie2017-09-28 00:36:41
Django
Bjornie, 2017-09-28 00:36:41

How to periodically send reminders to users in Django?

The task is to check all database users for the presence of fields with expiring dates and notify them by e-mail.
This is how I imagine this mechanism: for example, tasks.py accesses the User model, selecting all users who have expiring dates in the near future. Takes their e-mail, passes them to the scheduler, which sends a simple letter according to the given template.
Question: what is the best, easiest and most reliable way to do this? The application will most likely hang on DigitalOcean.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tema_sun, 2017-09-28
@tema_sun

The simplest solution in the forehead:
- make a management command for sending messages
- run this command by cron
Something more complicated I would do only if something ceased to be enough for me here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question