This paper deals with a single-machine scheduling problem with maintenance activities. Our purpose is to provide a near optimal solution using metaheuristics approach. In this problem, there are n jobs and m machines (m?n), each job must be assigned to one and only one machine, where the processing time of job (j) is (p_j). Furthermore there are M_G groups where each group has a fix periodic interval T and for each group, the maximum number of jobs processed in the machines available time interval (T) is K, (M_G=m/K). For finding the near optimal solution, we consider optimizing total cost scheduling problem. This problem has two types of costs, group cost and gap cost. In this study, first, proposed problem is formulated in a mathematical model. Next, a heuristic genetic algorithm is used to obtain the proposed problem and on example is presented to verify the efficiency of the algorithm.