I would like to develop a Plutus script that executes each time an epoch ends.
What's the best way to achieve this behaviour?
As mentioned by Jey earlier, blockchains and smart contracts remain latent until triggered by a user submitted transaction.
One way you could pull this off is that you could use the cardano-cli application to create, sign and submit a transaction which executed the plutus script at the end of every epoch. You can find out more about cardano-cli and plutus scripts here and a simple sample here
Hope this helps!