Using Process.send_after() outside of a GenServer?

This sounds like the perfect candidate to just emit data to a Phoenix.PubSub and have consumer(s) attached to it.

Now if you want a module that does something generalized and you can just pass a remote data provider to it (as you alluded to) then yes, it’s doable and from a quick skim of your code you are close to that goal.

Or you can just plug something like Retry and call it a day.