We consider the Klimov model for an open network of two types of jobs. Jobs of type i arrive at station i, have processing times that are exponentially distributed with parameter µi, and when processed either go on to station j with probability pij, or depart the network with probability pi0. Costs are charged at a rate that depends on the number of jobs of the two types in the system. It is shown that for arbitrary arrival processes the policy that gives priority to those jobs for whom the rate of change of the cost function is greatest minimizes the expected cost rate at every time t. This result is stronger than the Klimov result in two ways: arrival processes are arbitrary, and the minimization is at each time t. But the result holds for only two types.