issue #3935 Refactor CCScheduler.