When I first moved to my farm in CA, up in the mountains, we saw plenty of rattlers. I would generally pick them up with a rake, put them in a bucket with a lid, and relocate them. Two of them we had to kill (with a shovel). One insisted he was going to have the little blind barn cat as a meal. The other one killed one of my rescue mini-dachshunds. The next day, he got stuck in the yard fence, couldn't go forward, couldn't back up. Presumably after a big pack rat meal (always a problem). I felt no mercy for that guy. That's when we started vaccinating everyone for rattlers. For whatever reason, we stopped seeing them, at least in the yard, for the last few years there.
I wouldn't want to be applying some deterrent every day either. I vote for snake proof fencing installed half way up your other fence. You may have to trench the bottom in a little to keep them from slithering under.
This from the web:
Make a fence by burying 1/4-inch mesh wire screening 6 inches underground and building it up 30 inches, instructed NCSU. "It should slant outward at a 30-degree angle from bottom to top. ... "If you already have a wooden fence and the boards are very close together, a good solution is to snake-proof the bottom." A one time investment.
Or this:
Rattlesnake trying (and failing) to get through a rattlesnake fence
The screen holes have to be small enough that the little guys can't get through. They're actually more deadly than the big ones because they don't have much control over the amount of venom they inject.