Move the scheduler to its own process

Fixes #17000
Merge pull request #17120 from cachedout/issue_17000

Move the scheduler to its own process