In this research, the problem of scheduling flexible flowshop system with machine breakdown, machine eligibility, machine-dependent setup time and sequence-dependent setup time to minimizing total weighted earliness and tardiness is studied. Firstly, the problem is formulated as a Mixed Integer Linear Programming model. With this mathematic model, small-sized instances are solved to optimality. The considered problem is too dificult to be optimally solved for large problem sizes, and hence two metaheuristics algorithms namely genetic algorithm (GA) and imperialist competitive algorithm (ICA) are proposed to afford large-sized instances. Due to the sensitivity of the proposed algorithms to parameter's values, the taguchi method as an optimization technique to widespread tune different parameters of applied algorithms is employed to improve solutions authenticity. These proposed algorithms were coded and tested on randomly generated examples, then to accredit the effectiveness of them computational results are examined in terms of relative percentage deviation. Moreover, some sensitive analyses are executed for comparing the performance of algorithms in various conditions. The computational evaluations expressly confirm the high performance of the proposed genetic algorithm against imperialist competitive algorithm for related scheduling problem.