Run the scheduled tasks on a different thread