This paper studies the scheduling problem in transit networks in order to decrease transfer waiting time. Transfer waiting time is calculated based on headway and departure time of intersecting routes and is divided into two parts. The first part can be reduced by changing departure times and was studied by the authors previously. The focus of the present research, however, is to minimize the second part of the transfer waiting time, dependent on the headways. The proposed optimization model in this paper includes both parts and is a nonlinear mathematical programming model. The model is decomposed to the departure time setting model (DSM) and the headway setting model (HSM). A solution method based on a genetic algorithm is also suggested to solve the model for large transit networks. Results of a case study show good performance of the model and the solution algorithm.