task scheduler - working for 1 task. priority of tasks isnt working as expected