shut the stat off,and relight the pilot is it strong check the thermocoulpe tight into the valve...small adj wrench..if tight just loosen it pilot should drop out....the pilot flame may not be strong enough and being blown out when the main burner going off... pilot should stay on burner on or off....if the burner is running... view it and just turn the control valve to pilot see if it blows the pilot out....repeat it till it knocks the pilot....could be a draft down the flue in the off cycle...try that stuff
i would only add that a visual of the pilot should show a blue pilot flame about 1/4" to 1/2" enveloping the pilot tip. If the pilot flame is short and barely touching the tip (this is usually accompanied by a dirty looking yellow flame instead of a blue flame) than the pilot orifice is dirty and needs to be cleaned.
I always disconnect the pilot tube from the valve and blow 100psi to 200psi of co2 thru the tube to clear it. An air compressor is good too.
If none of these are available to you you must remove the pilot assembly from the burners and remove the the pilot orifice from the pilot body and clean out the tiny orifice the gas passes thru.
I use a very thin needle or very small drill bit. From inside the pilot orifice gently twist the the needle or drill in the tiny opening and blow thru it after a few twists. The blockage will usually clear easily.
Reinstall the pilot assembly and relight the pilot with a NEW THERMOCOUPLE!
if the pilot still wont stay lit, than the gas valve is bad.
Seems like a lot but it is easy. This is the method to use if you have no specialized tools for hvac service.