Limit switches are commonly used to detect the presence of a moving object when the object passes or when it reaches its final destination.

Online store for Limit switches by Honeywell, Omron, Selec.