Ahead-of-time function scheduler