Sadly, that doesn’t always help. I’ve lived in a city with several public toilets. Some people would still rather piss on a wall ~30 metres away from the public toilet rather than use it.
They probably reduced the amount of people doing that, though.
Cities which had someone blow a horn to wake everyone up would also have watchmen walking the city at night. Presumably, they would wake the next person up when their shift ended so that someone is awake at all times.