This paper concerns an approach to continuous time optimal scheduling problems for a large class of manufacturing systems.This class involves production, in make-to-order environment,based on multi-level bills of materials,flexible flow shops with setup effects and finite capacities on the shop floor. The effective tool for solving such a complex problem appears to be a tandem architecture, where an expert system and optimal control scheduling model are involved in decision making.The control strategy being developed allows both expert scheduling rules and analytical rules (necessary setup conditions obtained from the maximum principle) to be applied for a directed search through setup alternatives.