Here is my Django Model:
from django.db import models
import datetime
class MyModel(models.Model):
my_timestamp = models.DateTimeField(
default=datetime.datetime(
year=2016,
month=10,
day=3,
hour=9,
minute=3,
second=1,
),
null=False,
blank=False,
editable=False,
)
I would like to trigger a certain action when the system's current date/time equals the value of any instance's my_timestamp field. What is the best way to do it? I could run Chron job that continuously ran and polled the all the instances. But that seems messy. Is there a way I can trigger this event without constant wasteful polling?
Can I register some kind of callback that would accomplish this for me?