Factory automation strongly relies on industrial wireless networks that are able to guarantee reliable and real-time transmissions. To this end, a recently approved International Electrotechnical Commission standard Wireless networks for Industrial Automation-Factory Automation (WIA-FA) is proposed to specify wireless networks for time-critical industrial applications. This paper proposes a Flexible Retransmission Scheme for reliable and real-time transmissions in WIA-FA networks, termed as FRS, which combines the advantages of a cyclic reservation diversity retransmission scheme and an on-demand retransmission scheme to make full use of the strictly limited communication resources. Further, we perform the reliability analysis by analytical modeling to FRS, whose major contribution lies in the dynamic selection of retransmission schemes according to the reliability analysis. Simulation results finally show that this work outperforms other retransmission schemes in terms of transmission reliability for different scenarios.