Smarter scheduling