Improving the operation of urban public transport scheduling level is an important way to increase the attractiveness of public transport. In this paper, from the interests of bus passengers and bus companies, A model that maximize the benefit of company based on a certain benefit of passengers is attempted to be developed. Passenger waiting time, bus capacity and other related factors as the main variables were considered in this study. An algorithm based on genetic algorithm was developed to solve the problem efficiently. By utilizing the transit module of the transportation planning software TransCAD, a route system was established based on the bus line 183 in Nanjing. Thus, the bus schedule is created and the optimization results could be dynamically displayed.