Prevents a command from being executed multiple times.