Add Scheduler class to help scheduling sync and async tasks