Slice your cucumbers and put them around your garden or wherever you notice wasps. You can also place them on aluminum foil since a chemical reaction occurs that wasps don’t like.
It's believed that something in the peel of a cucumber repels wasps, most likely the acidity, which also helps deter a variety of other pests from your garden, including slugs.