The current requirements of many manufacturing companies, such as the fashion, textile, and clothing industries, involve the production of multiple products with different processing routes and products with short life cycles, which prevents obtaining deterministic setup and processing times. Likewise, several industries present restrictions when changing from one reference to another in the production system, incurring variable and sequence-dependent setup times. Therefore, this article aims to solve the flexible job shop scheduling problem (FJSSP) considering due windows, sequence-dependent setup times, and uncertainty in processing and setup times. A genetic algorithm is proposed to solve the FJSSP by integrating fuzzy logic to minimize the weighted penalties for tardiness/earliness. The proposed algorithm is implemented in a real-world case study of a fabric finishing production system, and it is compared with four heuristics adapted to the FJSSP such as earliest due date, critical reason, shortest processing time, and Monte Carlo simulation. Results show that the performance of the proposed algorithm provides efficient and satisfactory solutions concerning the objective function and computing time since it overperforms (more than 30%) the heuristics used as benchmarks.