Yes there is, while its still cold and the beetles are sleeping. When things start to warm up and the saps flowing, the beatles flying, a fresh cut is like a dinner bell to bark beetles. Out here in So. Calf. we only have a 30 to 45 day window to trim pines(assuming your ethical) Might be longer out your way but you could check with forestry.
If its only dead wood you can do it any time of the year