<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I did the same thing on my side....<div><br></div><div><div>API CALL [load(mod_skel)] output:</div><div>+OK</div><div><br></div><div>2009-08-12 11:08:18.37891 [DEBUG] switch_scheduler.c:214 Added task 2 data_flush (core) to run at 1250089698</div><div>2009-08-12 11:08:18.37891 [CONSOLE] switch_loadable_module.c:889 Successfully Loaded [mod_skel]</div><div>2009-08-12 11:08:18.37891 [NOTICE] switch_loadable_module.c:270 Adding API Function 'skel'</div><div><a href="mailto:freeswitch@Maths-Mac.local">freeswitch@Maths-Mac.local</a>&gt; 2009-08-12 11:08:18.207113 [ERR] mod_skel.c:120 starting to flush data &nbsp;buffer...</div><div><br></div><div>Note that you don't need to start the thread manually, the core already has threads running for the scheduler.</div><div><br></div><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-size: 12px; "><div>Mathieu Rene</div><div>Avant-Garde Solutions Inc</div><div>Office: + 1 (514) 664-1044 x100</div><div>Cell: +1 (514) 664-1044 x200</div><div><a href="mailto:mrene@avgs.ca">mrene@avgs.ca</a></div><div><br></div><div><br></div></span></div></div><br class="Apple-interchange-newline"> </div><br><div><div>On 12-Aug-09, at 7:26 AM, mark morreny wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br>In my LOAD_FUNCTION, I am trying to have freeswitch to flush out some data every 10 s.&nbsp; The following lines of code does not show any effect at all.<br><br>&nbsp;&nbsp;&nbsp; switch_scheduler_task_thread_start();<br>&nbsp;&nbsp;&nbsp; switch_scheduler_add_task(switch_epoch_time_now(NULL), data_flush_callback, "data_flush","core",0,NULL,SSHF_NONE|SSHF_NO_DEL);<br> <br><br>SWITCH_STANDARD_SCHED_FUNC(data_flush_callback) {<br><br>switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "starting to flush data&nbsp; buffer...\n");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br><br>&nbsp;&nbsp;&nbsp; task-&gt;runtime = switch_time_now() + 10;<br> <br>}<br><br>Does anyone know how to get it to work?<br><br>Thanks,<br>Mark<br><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Brian West</b> <span dir="ltr">&lt;<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>&gt;</span><br> Date: Mon, Aug 10, 2009 at 8:53 PM<br>Subject: Re: [Freeswitch-users] Fwd:  Scheduler in module<br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br><br><br>switch_rtp.c has a simple one for the zrtp cache storing.<br> <font color="#888888"><br> /b<br> </font><div class="im"><br> On Aug 10, 2009, at 7:13 AM, Michael Jerris wrote:<br> <br> &gt; Re schedule is done in your callback, take a look at places that use<br> &gt; these apis in the code for details.<br> <br> <br> </div><div><div></div><div class="h5">_______________________________________________<br> FreeSWITCH-users mailing list<br> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br> </div></div></div><br> _______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></div></body></html>