Actually the problem is very common. Let me describe this by example.
Imagine you have a web service where users register and pay for some gold status. There is expiration date. The question is how to remove the gold status in time?
I see at least two solutions:
But I believe there are other approaches. By the way the language the system is written is Python but I don't think this really matters.