When the British troops under Howe landed on the Charlestown Peninsula across from Boston before the battle of Bunker Hill, five British lower enlisted quit their ranks and attempted to desert to the American lines up the hill. They were caught and were brought to Howe, who singled out two of them and said, 'hang those two' which was promptly done
Five men walking up Breeds Hill as their battalion was deploying for action? Tactless, really. Which regiment were they from, again?
Desertion in the face of the enemy was about as serious a crime as a soldier could commit, and deserting to the enemy was treason. Officers and NCOs have often been forced to threaten men who were wavering, and on occasion carry out those threats. The spontoon and halberd weren't primarily for use against the enemy. It was no coincidence that NCO's halberds formed the scaffold for floggings
William Howe was in fact notoriously reluctant either to flog or execute malefactors. There were numerous cases of his reprieving condemned men at the last minute. He also issued a general pardon to deserters in September 1776.