While growing plants in industrial hothouses it needs to keep the temperature according to round-the-clock graph at the point of growth of plant located at the fixed height. Only small deviations are admitted. To obtain this it is possible to increase the temperature by heating the floor and to decrease the temperature by opening the ventilator windows at the ceiling. We propose and analyse the model based on the heat equation. Physical sense of this problem is that at one end of the infinitely thin rod of length l (the height of the hothouse) we keep during the time T the temperature ϕ(t) (control function), while at the other end we have the given heat flow (t). It requires to find the control function ϕ0(t) such that the temperature at the fixed point c be maximally closed to the given temperature z(t). For the estimation of the control quality we use a quadratic integral functional.