This paper deals with the problem of processing a set of n jobs on two identical parallel machines. In order to reduce the probability of machine breakdown with minor sacrifices in production time, the machines cannot process the jobs consecutively, they need to be maintained regularly (here we assume that the largest consecutive working time for each machine cannot exceed an upper limit T). Two scheduling models are considered. In the first model, the maintenance activities are performed periodically and the objective is to schedule the jobs on two machines such that the makespan is minimized. In the second model, the maintenance activities are determined jointly with the scheduling of jobs, and the objective is to minimize the total completion time of jobs. For the first problem, we introduce an O(n2) time algorithm named MHFFD and show that the performance ratio of MHFFD is at most {1.6+1.2 σ, 2}, where σ≜t/T, t is the amount of time to perform each maintenance activity. For the second problem, we apply the classical SPT algorithm to it and show that the worst-case bound of SPT algorithm is no more than 1+2 σ. We also point out that for the case of single machine, if the SPT schedule has three batches, then the upper bound of SPT algorithm can be reduced from the known result 21/17 to 11/9 under the assumption that t<T.