[erlang-questions] repeat function every hour
Evans, Matthew
mevans@REDACTED
Fri Apr 30 01:01:22 CEST 2010
Yes.
timer:apply_after(Time,M,F,A).
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.
Matt
-----Original Message-----
From: erlang-questions@REDACTED [mailto:erlang-questions@REDACTED] On Behalf Of Wes James
Sent: Thursday, April 29, 2010 6:57 PM
To: erlang-questions@REDACTED
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?
thx,
-wes
________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
More information about the erlang-questions
mailing list