Y
Y
Yura Khlyan2017-05-11 11:40:13
Django
Yura Khlyan, 2017-05-11 11:40:13

Periodic sending of emails. How to implement?

Good day.
I have an order preview view (collects sold products and forms an order with a supplier), and from this view there is another AJAX view that checks out the order and sends an email to the supplier. So, for some suppliers, you need to send orders automatically, and for different customers at different intervals. How can I implement this?
My store is written in Django Oscar (framework from Django). If you have a question about the structure of the models or the code, I will add the question.
Thanks in advance for your reply.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2017-05-11
@MAGistr_MTM

The easiest way is to write your own management command and run it with cron . Another way is to use the Celery job queue , for which you can define asynchronous scheduled tasks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question