Before alarm clocks were invented, people were hired to wake up workers for their shifts.
While these days people rely on their cell phones or standalone alarm clocks (or both) in order to wake up in the morning, these are relatively modern conveniences. Personal alarm clocks were patented in Europe in 1847, but that was not affordable and, therefore, not commonly used by the general public. However, people still needed a way to wake themselves up in the morning or they could find themselves without a job. This is where the knocker-ups came in.
In the United States, the expression "knocked up" is slang for pregnant; however, it had a very different meaning in 19th century Britain and Ireland. Being "knocked up" referred to being tired or to being awakened by someone knocking at your door or window. And that is exactly what the knocker-ups, also called knocker-uppers, did. As late as the 1970s, there were people whose job was to get up early in the morning and go around to the houses of paying clients and wake them up by knocking on their door or window.
At first, knocker-ups would knock on their client's door, but they soon learned that doing so often resulted in waking up the client's neighbors as well. Not only did this generate complaints from the neighbors who didn't want to be woken up, but it also allowed some people to take advantage of the opportunity to be awakened for free. The knocker-ups solved this problem by tapping directly on the paying client's window, often using a long pole to reach the upper story windows. Some knocker-ups would use hammers, rattles, or pea shooters to wake their clients.