"Run in circles, scream and shout" - from where?

With this zombie apparently being allowed to live afresh: I’m wondering whether the discussed item of “wise advice” might have been inspired by the first verse of a much-liked hymn, written in the early nineteenth century –

Oft in danger, oft in woe,
Onward, Christians, onward go:
Bear the toil, maintain the strife,
Strengthened by the Bread of Life.

PPs mention the “When in [fill in the blank – sometimes ‘danger’] or in doubt” verse, as being often associated with the US Navy. This strikes something of a chord: the British military, certainly, used to be very fond of parodying well-known hymns, in reference to their non-religious experiences / trials / tribulations.

Google Books has added millions more entries since 1908, so I figured there might be earlier hits.

Yep. A letter in the June 1911 issue of Motorboating magazine has this:

He calls it an “old adage.” Popular Aviation, Nov. 1928, adapts it for pilots:

It’s easy to see how this would be parodied.

The origin of the phrase may be in Psalm 62:

Those aren’t examples of the phrase, though. “Do something prudent when worried” is completely different advice from “panic when worried”.

This is the verse that the mocking version is parodying. If it’s an old adage in 1911, then it’s likely that a parody existed that didn’t get into print. Knowing the original helps to understand the parody.

The management-coaching version I’m familiar with is “When you don’t know what to do, walk fast and look worried.”

I always thought the rhyme was:

When in doubt,
scream and shout,
Wave your arms
and run about!

I associate this too with the Dilbert collection “Our disaster plan goes something like this: Help, help!”