Most of client task scheduling logic done.