This article analyzes the programming of farm production, understood not only as the choice among several crops, but also as their temporal distribution. The empirical study takes as a reference the horticultural sector in southeast Spain, since this area constitutes the highest concentration of small-scale farm production in Europe, where the climatic conditions allow the possibility of several harvests in year-round production, as well as several alternative crops. Firstly, we study the production programming for an individual farmer, under the assumption that their decisions do not affect the balance of market prices. In this case a modified Markowitz model is used for the scheduling of crop marketing. Secondly, we study the sales arrangements for a farming-marketing cooperative, under the assumption that their sales volume is such that the entity is capable of altering the market balance. A model of monthly revenues and margins is proposed, and the results show a clear improvement in both margins and revenues if the harvest is programmed in this way.