Abstract In recent years, the increase in population and the decrease in agricultural lands and water shortages have caused many problems for agriculture and farmers. That is why scheduling is so important for farmers. Therefore, the implementation of an optimal schedule will lead to better use of agricultural land, reduce water consumption in agriculture, increase efficiency and quality of agricultural products. In this research, a scheduling problem for harvesting agricultural products has been investigated. In this problem, there are n number of agricultural lands that in each land m agricultural operations are performed by a number of machines that have different characteristics. This problem is modeled as a scheduling problem in a flexible workshop flow environment that aims to minimize the maximum completion time of agricultural land. The problem is solved by programming an integer linear number using Gams software. The results show that the proposed mathematical model is only capable of solving small and medium-sized problems, and due to the Hard-NP nature of the problem, large-scale software is not able to achieve the optimal solution.