Optimization in task–completion networks