skip to Main Content

I have a site I’m working on that I’d like to add an option to sign up for a weekly newsletter type thing. I did a lot of looking around, and I was wondering if the python schedule library is an okay thing to use for this (https://schedule.readthedocs.io/en/stable/).

Could I have my website running and then a scheduler running in tandem that runs a django management command to send emails to those who sign up? I’m fairly new to this kind of thing, so I just wanted to check since I couldn’t really find any info of other people doing this.

I have a script that sends emails and when I use the scheduler to send them every however many minutes it works, but I’m just wondering about the scalability of this. I think I’d like to avoid using something like celery since it seems like sort of a big solution to a small problem.

2

Answers


  1. I think Celery is a great option to achieve your goal.
    You will also need another tools, according to the docs:

    Celery requires a message transport to send and receive messages. The RabbitMQ and Redis broker transports are feature complete, but there’s also support for a myriad of other experimental solutions, including using SQLite for local development.

    Take a look at the rest of the doc

    Login or Signup to reply.
  2. I would say celery is often an overkill, especially if you are running a single task because it requires a message transport server and the library has a lot of unnecessary features for a simple use case.

    I would recommand to use django-q2 which provides a full django admin integration and can run using your app database.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search