scheduling Task logic