Revert "Remove periodic IO component, logic is now encoded in the scheduler"

This reverts commit 1063401286201bf9a0dbedf6c04a021cf56fa0a3.
Only activate scheduler on startup, and when a thread is finished
Also trigger scheduler on new token