I'm writing a database application where certain parts of the database might need updates based on time, not based upon user actions.
For example, there may be certain values that are updated daily, and certain other values that must be updated say, four hours after the database entry is created.
Thus I need some way to update values regularly (a script that updates the database daily) and a way to update values at a specific time in the future (when the entry is created, you need to run an update in four hours).
The database will be managed through a web front end, so I'm using Django to set up the database and the administration, because Django makes designing the database a pleasure. However, I have no idea how to set up the other side, the side that updates the database at certain times.
How would you guys suggest doing this? Would it be sufficient to run a python script and run it with a daily cronjob, or is that not the best practice? Is this sort of thing done frequently, and do tools / methods exist to do this?
I have no experience with this sort of thing, and I'd like to know how it's generally done before I jump in and start reinventing the wheel.