This paper describes the design of a two-level hierarchical production scheduling engine, which captures the industrial practice of mass production semiconductor fabrication factories (fabs). The two levels of the hierarchy consist of a mid-term scheduler and a short-term scheduler, and are aimed at achieving coordination between the fab-wide objectives and local shop-floor operations. The mid-term scheduler maximizes weighted production flow to reduce the fab-wide cycle time and ensure on-time delivery by properly setting daily production target volumes and reference work-in-process (WIP) levels for individual part types and stages. Mid-term scheduling results are further broken down into more detailed schedules by the short-term scheduler. In addition to the same set of operational constraints in mid-term scheduling, the short-term scheduler includes the consideration of batching effects. It maximizes weighted production flow while tracking the daily production targets and the reference WIP levels specified by mid-term scheduling. The schedulers adopt a solution methodology with three ingredients; the Lagrange relaxation approach, network flow optimization, and Frank-Wolfe method. The scheduling tool is reasonably efficient in computation.