Caretaker

Caretaker is a title and occupation held at Hogwarts School of Witchcraft and Wizardry by a witch, wizard or Squib in charge of overseeing the cleanliness and hygiene of Hogwarts Castle. Aside from this, they may patrol the corridors at night to make sure that no students wander in the late hours. In the past, they were also in charge of corporal punishment (e.g. caning ) until a Headmaster, likely Albus Dumbledore, banned it.

Apollyon Pringle
"Your father and I had been for a night-time stroll. He got caught by Apollyon Pringle - he was the caretaker in those days - your father's still got the marks."

- Molly Weasley to her son, Bill.

Mr. Apollyon Pringle was the caretaker at Hogwarts from at least 1961 to 1968. During his tenure, corporal punishment was allowed and Mr. Pringle was entitled to cane any student found wandering the corridors at night. At one time, at about four o'clock in the morning, he caught Arthur Weasley strolling about the castle and caned him while Molly Prewett, who had been with Arthur, escaped. It was said by Molly, in the 1994–1995 school year, that Arthur still had the marks inflicted on him. By 1973, Mr. Pringle had retired, died or left the school and was replaced by Argus Filch and his cat, Mrs. Norris.

Argus Filch
By at least 1973, Argus Filch, a Squib, had replaced Pringle as Caretaker of Hogwarts School. He, along with his cat, Mrs. Norris, frequently patrolled the corridors at night and delighted in punishing students. He also waged an endless war with the school's poltergeist, Peeves. He constantly hassled students over the littlest infraction and took delight in the doling out of detention-worthy write-ups. In 1995, when Dolores Umbridge was made Headmistress, Filch was allowed to use corporal punishment on students, though it was revoked at the end of the year. He also continued as caretaker through Severus Snape's tenure as Headmaster and seemed not to mind Snape nor the Carrows. It is likely that Filch remained at the school after their suspensions.