How to perform actions periodically with Erlang's gen_server?
I want to start a gen_server that additionally, will perform one action every minute. What is the best way to schedule that? You have two easy alternatives, use timer:send_interval/2 or erlang:send_after/3 . send_interval is easier to setup, while send_after (when used in the Erlang module) is more reliable since it is a built-in function, see the Efficiency Guide . Using send_after also ensures that the gen_server process is not overloaded. If you were using the send_interval function you would get a message regardless if the process can keep up or not. With send_after being called just