Best practices when working with periodic tasks

A very simple way is using Process.send_after/4. A gen_server can just send itsself a repeating message.