Just build a hopper clock then create a worldborder with the hopper clock outside it. It ceases to function, if the border expands to contain it it beegins to function again.
Linked issues
Comments 4
Dupe of MC-63446
You are absolutely wrong. Before 14w30x hopeprs worked outside the worldborder. Currently this relates to hoppers not accepting items but still giving them, you can test this by putting a hopper on top of a chest and then making the worldborder smaller then trying to throw an item in. Redstone clocks also work outside the worldborder. Don't talk about what you do not know.
Nothing functions outside the world border.