<div dir="ltr">Sorry missing something here, and init/1 function in what?<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 April 2017 at 14:06, Dmitry <span dir="ltr"><<a href="mailto:mbike2000ru@yahoo.com" target="_blank">mbike2000ru@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:13px"><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_221786">Hello</div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_221786"><br></div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_221786">I have an init/1 function which does not start at application startup.</div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_221786"><br></div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_221786"><br></div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_221786"><br></div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_221786"><br></div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223453">init([Ref, Socket, Transport, Opts]) -></div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223453"><br></div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223453">    MyTable = ets:new(myphone, [set]),<br></div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223454"><br></div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223455">    MyTable2 = ets:new(socket1, [set]),</div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223456">    lager:start(),</div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223457"><br id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223458"></div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223459">  Timer = erlang:send_after(1210000, self(), check),</div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223460"><br id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223461"></div><div id="m_1229577886295578207yui_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="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223462"><br></div><div id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223462"><br></div><div dir="ltr" id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223465"><br></div><div dir="ltr" id="m_1229577886295578207yui_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="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223465"><br></div><div dir="ltr" id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223465"><br></div><div dir="ltr" id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223465"><br></div><div dir="ltr" id="m_1229577886295578207yui_3_16_0_ym19_1_1491475250124_223465"><br></div></div></div><br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>