The problem of management of production for an automated manufacturing system is described. The system consists of machines which can perform a variety of operations on a family of parts. The machines are unreliable, and the chief difficulty the control system faces is to meet production requirements while the machines fail and become repaired at random times. A three-level hierarchical control algorithm is proposed which involves stochastic optimal control, network optimization, and scheduling. An example is presented.