Electron acceleration by a chirped laser pulse in an azimuthal magnetic field in a plasma has been studied. The betatron resonance saturates and the electrons start losing energy beyond a specific point of time without a frequency chirp. The resonance can be maintained for a longer duration and the energy of the electrons can be enhanced if a suitable frequency chirp is introduced. The duration of interaction increases for a lower plasma density or a lower initial electron energy which causes increase in the electron energy gain. The value of magnetic field required for resonance increases with an increase in plasma density and with a decrease in initial electron energy.