djangodjango-celerydjango-cron

Scheduling Tasks in Django


I am new to Django. I built a program that lets teachers assign homework to students. The homework has a due date that is different for each student.

I want to make it so that 1 hour before the homework is due for that particular student, they get sent an email.

So, for example:

How can I achieve this? Thanks!!!


Solution

  • write a Django Management command which identifies students who need to be sent a reminder email and then sends emails. use cron job(crontab in Linux) to run this Django management command periodically (every hour or every minute)