When is the best period to fix a door frame?
Well the big thing you're going to notice is just humidity will change it a lot.  If you want a door that closes properly year round, then the best time would be when it is not too humid, or not too dry (i.e spring would be fine).  This way when it gets humid or dry, you minimize the amount of warping the frame goes through