Cell-free massive multiple input multiple outputs (CF-mMIMO) is considered a promising technology for sixth-generation (6G) telecommunication systems. In the CF-mMIMO system, an extensive array of distributed small base stations (BSs) is deployed across the network, which enables us to facilitate seamless collaboration among BSs. To achieve this goal, the baseband signal from these BSs needs to be transmitted to a central server via fronthaul networks. Due to the large number of BSs, the data that needs to be transmitted is usually huge, which brings severe requirements on fronthaul networks. Time and wavelength division multiplexed passive optical networks (TWDM-PON) can be a potential solution for CF-mMIMO fronthaul due to their large capacity and high flexibility. However, how to efficiently allocate both optical and wireless resources in a TWDM-PON-enabled CF-mMIMO system is still a problem to be addressed. This paper proposes a joint scheduling method of wavelength, antenna, radio unit (RU), and radio resource block (RB) resources in the TWDM-PON-enabled CF-mMIMO system. Furthermore, an integer linear programming (ILP) model for joint resource allocation is proposed to minimize the fronthaul resource occupancy, thereby increasing network scalability. Considering the complexity of the ILP model, two heuristic algorithms are also presented to solve this model. We compare the ILP with heuristic algorithms under different scenarios. Simulation results show that the proposed algorithm can reduce the fronthaul resource occupancy to improve the network scalability of the CF-mMIMO system.