<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1491475250124_221786">Hello</div><div id="yui_3_16_0_ym19_1_1491475250124_221786"><br></div><div id="yui_3_16_0_ym19_1_1491475250124_221786">I have an init/1 function which does not start at application startup.</div><div id="yui_3_16_0_ym19_1_1491475250124_221786"><br></div><div id="yui_3_16_0_ym19_1_1491475250124_221786"><br></div><div id="yui_3_16_0_ym19_1_1491475250124_221786"><br></div><div id="yui_3_16_0_ym19_1_1491475250124_221786"><br></div><div id="yui_3_16_0_ym19_1_1491475250124_223453">init([Ref, Socket, Transport, Opts]) -></div><div id="yui_3_16_0_ym19_1_1491475250124_223453"><br></div><div id="yui_3_16_0_ym19_1_1491475250124_223453"> MyTable = ets:new(myphone, [set]),<br></div><div id="yui_3_16_0_ym19_1_1491475250124_223454"><br></div><div id="yui_3_16_0_ym19_1_1491475250124_223455"> MyTable2 = ets:new(socket1, [set]),</div><div id="yui_3_16_0_ym19_1_1491475250124_223456"> lager:start(),</div><div id="yui_3_16_0_ym19_1_1491475250124_223457"><br id="yui_3_16_0_ym19_1_1491475250124_223458"></div><div id="yui_3_16_0_ym19_1_1491475250124_223459"> Timer = erlang:send_after(1210000, self(), check),</div><div id="yui_3_16_0_ym19_1_1491475250124_223460"><br id="yui_3_16_0_ym19_1_1491475250124_223461"></div><div id="yui_3_16_0_ym19_1_1491475250124_223462"> {ok, #state{ref=Ref, socket=Socket, transport=Transport, opts= Opts, dict = MyTable, dict2 = MyTable2, timer = Timer}, 0}.<br></div><div id="yui_3_16_0_ym19_1_1491475250124_223462"><br></div><div id="yui_3_16_0_ym19_1_1491475250124_223462"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1491475250124_223465"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1491475250124_223465">How to force it to start at an application startup and only once.?</div><div dir="ltr" id="yui_3_16_0_ym19_1_1491475250124_223465"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1491475250124_223465"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1491475250124_223465"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1491475250124_223465"><br></div></div></body></html>