The effect of a time-sinusoidal magnetic field on the onset of convection in a horizontal magnetic fluid layer heated from above and bounded by isothermal non magnetic boundaries is investigated. The analysis is restricted to static and linear laws of magnetization. A first order Galerkin method is performed to reduce the governing linear system to the Mathieu equation with damping term. Therefore, the Floquet theory is used to determine the convective threshold for the free-free and rigid-rigid cases. With an appropriate choice of the ratio of the magnetic and gravitational forces, we show the possibility to produce a competition between the harmonic and subharmonic modes at the onset of convection.