[erlang-questions] repeat function every hour

Evans, Matthew <>
Fri Apr 30 01:01:22 CEST 2010



For example, to execute test_mod:test_fun(hello,1,2) every hour:

timer:apply_after(3600000, test_mod, test_fun, [hello,1,2]).

Of course, your function "test_fun" should call timer:apply_afer(Time,M,F,A) again.


-----Original Message-----
From:  [mailto:] On Behalf Of Wes James
Sent: Thursday, April 29, 2010 6:57 PM
Subject: [erlang-questions] repeat function every hour

I see that there is a timer module.  Is there something where I can
start an erl program and it will run a certain function at some given
time on a given interval - kind of like cron?



erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:

More information about the erlang-questions mailing list