Hybrid flowshop, or more commonly named Flexible flowshop, is a frequently problem in the industries in where all proccesed jobs have the same production routing, and therefore uses the stages in the same order. This paper shows the applicability of a heuristic algorithm to determine and optimize the average completion time when there are several jobs to process (15 to 20 jobs) in multiple stages (3 to 5 stages), and each job is associated to one specific weighted. The results showed by the algorithm are obtained from the interaction between the process, release and setup times; main constrains of this scheduling problems. The main contribution of this paper is to schedule a set of n jobs so as to minimize the makespan, developing a model that allows to identify the logical sequence of jobs to carry out for each stage.