Schedule a task with Django

The reason for the query is that I need to execute a method, after a time of a condition in Django.

class suppliersList(models.Model):
    id = models.AutoField(primary_key=True)
    ticket =  models.IntegerField(default=1000, blank=True)
    time = models.TimeField(default=None, blank=True)

Once the providers are loaded into the model (db), the time in which it was done is set and after 5 minutes I must execute a method which modify the database, so the scheduling of the event has to be internal to Django.

Is there a method in django that I can use to schedule a task?

What are you using for asynchronous/background processing?

1 Like

If you’re using Celery for your background tasks, celery beat will let you do that.