Commercial snake repellents which include clove oil, mint oil, cayenne pepper, cinnamon powder or sulfur may be somewhat effective.
They are never as effective as creating a physical barrier between your yard and the snake.