Added conditional to forever-sleep of TimeScheduler thread - may be necessary to add a timeout here in the future.
Merge.
Test commit