There is a loop near my place that takes about forty minutes. I do it when something is stuck. Roughly two thirds of the time, the answer arrives somewhere in the last ten minutes, and it is usually that I was solving the wrong problem.
For years I treated this as slacking off. Real work happened at the desk; walking was what you did when you had failed to work. That is exactly backwards for anything involving design, and design is most of what senior engineering is.
I have not found a way to schedule it, but I have stopped fighting it. If I am staring at the same file for the third time, I go outside. The code is still there when I get back, and quite often I delete a lot of it.