Preventive maintenance (PM) is a maintenance program with activities created at a determined interval or according to certain principles, designed to reduce the likelihood of failure or deterioration of item performance. This aims to improve overall reliability and system availability. In this research, a preventive maintenance schedule (PMS) was designed for electricity and desalination of water in power plants, subject to meeting relevant constraints. The proposed methodology is used to generate a PMS for the boilers, turbines, and distillers. A nonlinear integer programming (NLIP) model was employed to address this problem. The results of the proposed method were compared with the PMS for a power station in Kuwait. The results were better in terms of the volume of production and in terms of the gap between the available production and demand in order to continue providing consumers with electricity and water without a shortage in the event of a breakdown in equipment. It produces an improvement of 12.12% and 16.58% respectively, for water and electricity. Furthermore, the sensitivity and robustness of the proposed method were analysed by increasing the maintenance duration for some equipment, increasing the demand, and adding various additional conditions. In addition, a comparison of additional conditions with a binary problem method in terms of computer time for the search for an optimal solution was carried out, where the model provided an optimal solution in a reasonable time. Among the most important benefits that the user can obtain for this technique are extending the life of the equipment, increasing efficiency, and reducing expenses.