Run scheduler in its own thread