an Erlang module to run a task periodically