In my Django web app, an event's status changes from 'upcoming' to 'completed' at a certain date/time. However, I want to update the database as soon as the event object's date/tim开发者_StackOverflow社区e has passed. Any ideas how I would code this?
My only idea so far is to have a thread constantly running that that checks to see if the event object's date/time as passed. However, this would be a really garbage way of doing things because there are potentially hundreds of event objects I would have to do this for.
Thanks for your help,
Chris
The django-chronograph app is one way to schedule jobs -- it relies on a cron job to automate scheduled running of django commands.
精彩评论