The work we present in this paper is a continuation of a series of studies on the numerical study of natural convection in a square porous cavity saturated by a Newtonian fluid. The left vertical wall is subjected to a temperature varying sinusoidally in time while the right vertical wall is either at a constant temperature, or varying sinusoidally in time. The upper and lower horizontal walls are thermally adiabatic. Darcy model is used, it is also assumed the fluid studied is incompressible and obeys the Boussinesq approximation. The focus is on the effect of the modulation frequency (10≤ ω≤100) on the structure of the flow and transfer thermal. The results show that the extremal stream functions (Ψmax et Ψmin), the average Nusselt number at the hot (Th) and cold (Tc) walls respectively Nuh and Nuc are periodic in the range of parameters considered in this study. In comparison with the constant heating conditions, it is found that the variable heating causes the appearance of secondary flow, whose amplification depends on the frequency of modulation of the imposed temperature but also of the heating mode. The results are shown in terms of streamlines and isotherms during a flow cycle.