scheduler is not meant to run a periodic task every second. That being said, if you want it more reactive you should lower the heartbeat (default=3 seconds) . Mind that tasks gets assigned every 5 loops, so if heartbeat=1 sec you'll get ~5 seconds period. If you need to run something every second, you'll be much better using an external process in a while loop.
On Friday, February 8, 2013 6:11:54 AM UTC+1, Bernard wrote: > > I am using the web2py scheduler to run a task periodically, with a single > worker thread. The task is configured to run an infinite number of times. > If I set the task period to 1 second, I can verify that the task is being > run in the scheduler_run table, but the run_time indicates it is running > every 15 seconds. > > 35 newtask COMPLETED 2013-02-07 20:48:10 2013-02-07 20:48:11 you passed > ar... "done!" None Bernard-PC#5816 > 36 newtask COMPLETED 2013-02-07 20:48:26 2013-02-07 20:48:27 you passed > ar... "done!" None Bernard-PC#5816 > 37 newtask COMPLETED 2013-02-07 20:48:39 2013-02-07 20:48:40 you passed > ar... "done!" None Bernard-PC#5816 > 38 newtask COMPLETED 2013-02-07 20:48:55 2013-02-07 20:48:56 you passed > ar... "done!" None Bernard-PC#5816 > 39 newtask COMPLETED 2013-02-07 20:49:11 2013-02-07 20:49:13 you passed > ar... "done!" None Bernard-PC#5816 > 40 newtask COMPLETED 2013-02-07 20:49:25 2013-02-07 20:49:26 you passed > ar... "done!" None Bernard-PC#5816 > 41 newtask COMPLETED 2013-02-07 20:49:41 2013-02-07 20:49:42 you passed > ar... "done!" None Bernard-PC#5816 > 42 newtask COMPLETED 2013-02-07 20:49:54 2013-02-07 20:49:55 you passed > ar... "done!" None Bernard-PC#5816 > 43 newtask COMPLETED 2013-02-07 20:50:10 2013-02-07 20:50:11 you passed > ar... "done!" None Bernard-PC#5816 > 44 newtask COMPLETED 2013-02-07 20:50:26 2013-02-07 20:50:27 you passed > ar... "done!" None Bernard-PC#5816 > 45 newtask COMPLETED 2013-02-07 20:50:39 2013-02-07 20:50:40 you passed > ar... "done!" None Bernard-PC#5816 > > Is this 15 second by design? Is it configurable? > > Thanks, > Bernard > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.