With the wide application of advanced industrial Internet of Things (IIoT) and cyber physical system (CPS) technologies, the manufacturing resources assignment method is transformed from manual and passive mode to intelligent and active mode. However, due to the lack of real-time analysis and accurate prediction of production performance, the production adjustment demands are often released after production exceptions happen, and production decisions are often made based on historical production information, which may lead to the problem of production interruption or performance reduction. To address this issue, a proactive manufacturing resources assignment (PMRA) method based on production performance prediction for the smart factory is proposed. First, the advanced IIoT and CPS technologies are applied to create a cloud-edge cooperation environment for a smart factory, where the resources are made smart with distributed control capacity, and cloud center and edge resources can collaborate dynamically. Second, a real-time colored Petri net enabled key production performance indicators analysis and prediction method are proposed to extract real-time production information and predict future production status accurately. Then, the PMRA method is presented to assign the resources before production exceptions happen. Finally, a case study from a typical manufacturer for computer numerical control machine tools in North China is used to validate the proposed method and results show that the proposed PMRA method can largely reduce the total tardiness and the total energy consumption.