optimize the idempotency check of TaskScheduler