Bielecki and Kumar (1988) show that the threshold or hedging-point production policies are optimal in a continuous manufacturing system, even if production ability is uncertain. Their analysis assumes constant demand and processing time. In this paper, we consider a discrete manufacturing system in which production capacity, demand, and processing time are all nondeterministic. We formulate the problem into a discrete Markovian production model, and explore the most cost-effective control policy for such a system. With two more sources of uncertainty, we find that the threshold control policies are optimal among all feasible policies when the long run average cost is to be minimized. This extends Bielecki and Kumar's result which shows that the threshold policies are optimal among a subset of feasible policies.