The word janitor refers to someone whose job is to maintain the upkeep of a building, such as a school. You might call the janitor to clean up a spill or open a locker when someone has jammed the lock with gum. Janitors often hold a key to every door in the building. You don’t want to mess with them.
“Among the many billets which I have filled in America during my wandering life, I was once janitor and sweeper out of the laboratory at York College.”
— Arthur Conan Doyle, A Study in Scarlet, 1887Inside Parkway Northeast Middle School you'll find custodian Darryl Lewis doing the job he's paid to do. You'll also find him doing a job he loves to do: giving students hi-fives and words of encouragement as they walk to class. In his first year as a janitor, he's quickly become a hallway staple.
— Ryan Dean, KSDK.com, 21 May 2018
Appropriately, janitor derives from the Latin janus, meaning “arch” or “gate.” As an occupation, the word originally referred to one who keeps guard at an entry gate:
At the expiration of that time, wheels were heard whirling up to the gate--the young janitor went out with his gate-keys. It was a lady whom he let in at the bailiff's door.
— William Makepeace Thackeray, Vanity Fair, 1848
Janus is also the name of the Roman deity regarded as the doorkeeper of Heaven and associated with doors and gates. He was depicted with a two-faced head (perhaps to see those coming in as well as those going out); consequently, the adjective Janus-faced can mean “two-faced” or “duplicitous.” As he is also associated with beginnings, Janus also gives us the name January for the first month on the calendar.
The noun custodian, which describes a job similar to a janitor, can also refer to one who keeps watch or guard. You do not want to mess with them either.