While the administration of the supply chain has shown substantial advances during the last years, the planning of the production constitutes a critical element that has centered the biggest attention in the investigation in these last years. The companies, independently of the ERP used, should fulfill the requirements of the clients. There are basically two different classes of orders: those known in the literature as "production orders " (also known as PO or agreed orders) and the remaining ones (not agreed orders). The strategy backward allows to plan the PO backward, starting from the Due Dates. The resulting planning, generates availability of resources (usually denominated "holes") that allows to estimate the feasibility of the planning of the not agreed orders. On the other hand, in many cases it is necessary to keep in mind the optimization of the resources used in the production. In this work we propose an algorithm based on backward planning that seeks on one hand, to approach the problem of the optimization of the resources used in the production, and also, to satisfy the requirements of the clients.