The invention discloses a batch scheduling method for flexible job shops based on genetic algorithms. The steps of the method are: (1) Determine the operating parameters, including population size M, crossover probability P C , the mutation probability P M , the number of iterations T; (2) Initial population generation, using segmented coding method to generate batch codes and process codes; (3) Individual fitness calculation, taking the reciprocal of the individual’s total completion time as its fitness value; (4) Select Operation, using the roulette selection operator; (5) crossover operation, setting crossover execution criteria, performing crossover on batch codes or process codes according to the criteria, and repairing after crossover; (6) mutation operation, using multiple Point mutation, using reverse sequence mutation for the process code; (7) Termination discrimination, judging whether the number of generations meets the termination condition, stop if it is satisfied, and output the optimal scheduling plan, otherwise go to (3). The invention can optimize the production operation of the flexible workshop, effectively shorten the production cycle, has strong applicability and is easy to popularize.