Soiling in solar panels causes a decrease in their ability to capturing solar irradiance, thus reducing the module’s power output. To reduce losses due to soiling, the panels are cleaned. This cleaning represents a relevant share of the operation and maintenance cost for solar farms, for which there are different types of technologies available with different costs and duration. In this context, this paper proposes a method that allows scheduling the dates on which cleaning generates greater utility in terms of income from energy sales and costs associated with cleaning. For this, two optimization models that deliver a schedule of dates where the best income-cost balance is obtained, are proposed and compared: a deterministic Mixed Integer Linear Problem and a stochastic Markov Decision Process. Numerical results show that both models outperform the baseline case by ∼ 4.6%. A simulator was built and both models were compared to the baseline case for 10,000 rainfall and irradiance scenarios. The stochastic model outperformed both models for all scenarios, thus proving that modeling rainfalls increases profitability in the face of uncertainty.