With the rapid development of high-speed railway systems and railway wireless communication, the application of ultra-wideband millimeter wave band is an inevitable trend. However, the millimeter wave channel has large propagation loss and is easy to be blocked. Moreover, there are many problems such as eavesdropping between the base station (BS) and the train. As an emerging technology, reconfigurable intelligent surface (RIS) can achieve the effect of passive beamforming by controlling the propagation of the incident electromagnetic wave in the desired direction. We propose a RIS-assisted scheduling scheme for scheduling interrupt flows and improving quality of service (QoS). In the propsed scheme, an RIS is deployed between the BS and multiple mobile relays (MRs). By jointly optimizing the beamforming vector and the discrete phase shift of the RIS, the constructive interference between direct link signals and reflected link signals can be achieved, and the channel capacity of eavesdroppers is guaranteed to be within a controllable range. Finally, the purpose of maximizing the number of successfully scheduled flows and satisfying their QoS requirements can be practically realized. Extensive simulations demonstrate that the proposed scheme has superior performance regarding the number of completed flows and the system secrecy capacity over four baseline schemes in literature.