I need to implement such a system that invokes method calls at the specific date and time. For example, let's say that I want to execute method foo() at 2007-11-03, 11:32:10. How should I implement this kind of system. Should I use cron somehow or a thread that sleeps (possibly a very long time) and then executes.
I use Python, but I think that this is not programming language related question as much as it is algorithmic.
At the moment, the best idea I have is to create a new thread, set when function should be calld, calculate time difference from current time and sleep that time difference in thread.
Bookmarks