The on and off again of the gas valve (you can probably hear it) is usually a sign of a flame sensing circuit that's either dirty or a control board that's getting on in age. Depending on how your furnace is designed, there may be a thin rod close to the pilot. You can VERY CAREFULLY use steel wool and gently clean it. You may find a fine rust layer on it. And also check that the flame sensor and pilot assembly are well secured to the furnace frame.
You might start doing research for a new control board, just in case that's the real cause. That way you'll be prepared in case things fail on a cold February night.
