An automatic sprinkler system would work, but that might be kind of expensive. You could also get a dog! Or the cheapest thing to do would be to set out orange peels because cats are supposed to hate the smell of citris.
There are several products in the market which suddenly shower water when any animal enters into the boundary of the yard. This certainly frightens the animal without harming it and it deliberately avoid to come again to that particular area. Moreover you can use your pet dog, if you have one, to serve the purpose.