Before the invention of alarm clocks people used candles as alarms. These candles burnt for a specific time. These candles were erected in a metal plates and a nail was put on the candle at desired place. When the candle burnt to the nail, the nail fell down in the metal plates and created sound or alarm.
Some people also hired "knockers-up" who used to wake people up by banging sticks or shooting dried peas at their windows.