Extracted scheduling code to multi_scheduler gem.