write server end task