<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">thats in seconds.<div><br></div><div>Mike</div><div><br><div><div>On Aug 14, 2009, at 8:32 AM, mark morreny wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,</div> <div> </div> <div>Thank you for your help. </div> <div> </div> <div>I get that too, but the callback does not execute the second time. </div> <div> </div> <div>When I do task->runtime = switch_time_now() + 10;, what does +10 mean? Does it mean 10 s or 10 mins?</div> <div> </div> <div>Thanks,</div> <div>Mark<br><br></div> <div class="gmail_quote">On Wed, Aug 12, 2009 at 11:09 PM, Mathieu Rene <span dir="ltr"><<a href="mailto:mrene_lists@avgs.ca">mrene_lists@avgs.ca</a>></span> wrote:<br> <blockquote class="gmail_quote" style="padding-left: 1ex; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; position: static; z-index: auto; "> <div style="WORD-WRAP: break-word">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" target="_blank">freeswitch@Maths-Mac.local</a>> 2009-08-12 11:08:18.207113 [ERR] mod_skel.c:120 starting to flush data 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><font color="#888888"> <div> <div style="WORD-WRAP: break-word"> <div><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" target="_blank">mrene@avgs.ca</a></div> <div><br></div> <div><br></div></span></div></div><br></div></font> <div> <div></div> <div class="h5"><br> <div> <div>On 12-Aug-09, at 7:26 AM, mark morreny wrote:</div><br> <blockquote type="cite">Hi,<br><br>In my LOAD_FUNCTION, I am trying to have freeswitch to flush out some data every 10 s. The following lines of code does not show any effect at all.<br><br> switch_scheduler_task_thread_start();<br> 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 buffer...\n");<br> <br><br> task->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"><<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>></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" target="_blank">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><br>On Aug 10, 2009, at 7:13 AM, Michael Jerris wrote:<br><br>> Re schedule is done in your callback, take a look at places that use<br>> these apis in the code for details.<br></div></div></blockquote></div></div></div></div></div></div></blockquote></div></blockquote></div><br></div></body></html>