To address the increase of electricity demand, the need for reducing carbon dioxide, and the reduction of available fossil fuel resources, renewable energy sources are being recruited. Specifically energy generated by photovoltaic (PV) cells is becoming one of the most promising alternatives. In this context, this paper presents an optimization model for the scheduling problem where conventional and photovoltaic sources of energy are scheduled to be delivered to satisfy energy demand. The optimization model is formulated as a Linear Program (LP) with a bounded number of variables and constraints. The respective solution can be obtained in polynomial time and provides the optimal combination or schedule of energy generated from different sources (conventional, renewable and battery storage) such that the total demand is satisfied and the profit is maximized. Numerical results demonstrate the effectiveness and the generality of the scheme.