I don't think I've ever heard an answer to that one. I would just replace it every month or so. Since it's an oil it would leave a residue I doubt goes away although the effectiveness of it would probably diminish over time. They hate cinnamon and red chili pepper too and my wife recently ordered some of each and little bags to put it in to place in areas where they might come into the house. There was a concern that our Yorkies might try eating a poison, so this was a better alternative.
I have also heard you can mix the peppermint oil in a spray bottle diluted with water and spray the wires with it. To me this seems the easier solution and one I have tried.
I'll never forget we used to service a very expensive rooftop chiller, and numerous times we would go there to find the squirrels had chewed through the sensor wires effectively shutting down the chiller. We bought one of those expensive electronic gadgets that was supposed to keep them away. Never worked.