Working scheduling of task and cancellation