We present a model for quasi-phase matching (QPM) in high-order harmonic generation (HHG). Using a one-dimensional description, we analyze the time-dependent, ultrafast wave-vector balance to calculate the on-axis harmonic output versus time, from which we obtain the output pulse energy. Considering, as an example, periodically patterned argon gas, as may be provided with a grid in a cluster jet, we calculate the harmonic output during different time intervals within the drive laser pulse duration. We find that identifying a suitable single spatial period is not straightforward due to the complex and ultrafast plasma dynamics that underlies HHG at increased intensities. The maximum on-axis harmonic pulse energy is obtained when choosing the QPM period to phase match HHG at the leading edge of the drive laser pulse.