On Saturday, November 18, 2017 at 1:52:56 AM UTC-5, [email protected] 
wrote:
>
> thank for you answer i  use
> python G:\\web2py\\web2py.py -K yj:sss -X -a '1' -i 0.0.0.0 -p 8000 &
> to run my app,can you  give me a example ? i understand the script,but i 
> don't know how to use it in my app
> and when i use scheduler it auto use threading create so many task, i want 
> to control it's quantity,how to do? 
>

Where is your script and how are you running it? If you are starting the 
scheduler worker as above, the scheduler and scheduler task must be defined 
in the context of a web2py app, not a standalone script. From your script 
code, the function defining the task should either go in a model file in 
the app or go in a module and be imported into a model file. The code 
defining the scheduler should go in a model file in the app. And the code 
queuing the task should be executed elsewhere -- you can run the queuing 
code from a web2py shell, define a controller action that queues the task, 
or even directly add a record to the scheduler_task table (possibly via 
appadmin) to queue a task.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to