Task running framework w/ time and event-based scheduling