1

I'm using a Windows OS and have a model where users selects a date. Based on the date I want to send an email to the user at an interval of 10, 25, 35, 50 days. I checked celery but now celery isn't supported on windows....can someone please help me with it..how to setup this functionality?

aman lucky
  • 21
  • 2

1 Answers1

0

One approach would be to use signals: "The Django Signals is a strategy to allow decoupled applications to get notified when certain events occur." So you set up a function that, based on a event, will generate an email. You have plenty of examples on the web. For instance:

Django Sending Email Using Signals

https://anymail.readthedocs.io/en/stable/sending/signals/

https://stackabuse.com/using-django-signals-to-simplify-and-decouple-code/

So how do you create the event? Someone asked on stackoverflow this question and you will find a nice approach:

Django Timed Events and

Set up a scheduled job?

In a nutshell, you create a custom management command and use cron (on Linux) or at (on Windows) to run your command at the required times. Thus you avoid celery.

Gilles Criton
  • 673
  • 1
  • 13
  • 27