Cleaned up flaky spec, refactored scheduler [#82797334]

Signed-off-by: Tira Odhner <atiraodhner@gmail.com>