This paper tackles the scheduling problem of both production and flexible preventive maintenance activities on a single machine under human resource constraints. The considered human resources oversee the maintenance activities. They are characterized by a competence level and a timetabling that determines their availabilities. Our objective is to minimize a common and weighted objective function that involves both the tardiness and the earliness resulting from production and maintenance activities when considering maintenance workers. We first introduce a mathematical modeling for the studied problem that we implemented in Cplex in order to compute the optimal solutions of small instances of this problem. Secondly, we propose an improved Guided Local Search (GLS) metaheuristic to deal with relatively large instances of the problem. Cplex is used as a reference exact method to check the solution quality of the approached method GLS. The proposed methods are evaluated on a large number of randomly generated instances. The experimental results show that the studied problem is very hard to solve optimally, the approached method GLS performs well and is able to find good solutions to instances up to 700 jobs in a reasonable CPU time.