The dynamic scheduling problem (DSP) in unreliable flexible manufacturing systems (UFMSs) with concurrency, conflicts, resource sharing, and sequential operations is a complex optimization problem that requires the use of efficient solution methodologies. The effectiveness of scheduling UFMSs relies on the quality of equipment maintenance. Currently, UFMSs with consistently large queues of parts awaiting service employ a repair-after-failure approach as a standard maintenance procedure. This method may require unexpected resources, incur costs, consume time, and potentially disrupt the operations of other UFMSs, either partially or fully. This study suggests using a predictive maintenance (PdM) strategy that utilizes the Internet of Things (IoT) to predict and avoid early mechanical equipment failures before they happen in UFMSs, thereby reducing unplanned downtime and enhancing reliability. Therefore, the objective of this paper is to construct timed Petri net (TPN) models using the IoT for the PdM configuration of mechanical equipment in the dynamic scheduling problem of UFMSs. This necessitates that users represent the specific problem using TPNs. The process of PN modeling requires the utilization of domain knowledge pertaining to the target problems as well as to machine information. However, it is important to note that the modeling rules for PNs are straightforward and limited in number. Consequently, the TPN model is applied to generate and formulate mixed-integer linear programming (MILP) instances accurately. This is done to identify the optimal production cycle time, which may be implemented in real-life scenarios. Several UFMS instances are used to demonstrate the applications and effectiveness of the proposed method. The computational results demonstrate that the proposed method shows superior solution quality, effectively solves instances for a total of 10 parts and 6 machines, and achieves a solution in a reasonable CPU time.