Replaced scheduler thread to scheduler actor