Except that I pass the function, rather than a string, my usage is the
similiar to yours:
scheduler.queue_task(demo1,
repeats = 0, period = 180,prevent_drift=True)
On Thursday, June 26, 2014 11:38:13 AM UTC+10, 黄祥 wrote:
>
> hi,
>
> i tested and learned from web2py doc
i've already tried, but got the same result + another strange output during
start web2py. here is the detail step i took.
1. create new web2py app (copas the welcome folder and rename it into test)
2. copas the scheduler.py into models (test\models\scheduler.py)
*test\models\scheduler.py*
db.defi
@guys..if you queue a task inside models, you're queuing a new task at
every request ! ;-D
On Thursday, June 26, 2014 6:17:54 AM UTC+2, 黄祥 wrote:
>
> i've already tried, but got the same result + another strange output
> during start web2py. here is the detail step i took.
> 1. create new
a, i c, so that's why scheduler_task table is have a lot of record. thank
you so much simone. btw, what i want to learn in here is to have a
scheduler to create a new record in database every day, how can i achieve
it using testing example above?
what i have tried is :
*models/db.py*
db.define_
you're missing a BG point.
Either you need to queue a task as a result of some user action (i.e. send
a reminder, calculate/aggregate/refresh some data, etc) --> usually it's a
one-time-only activity, in which case, the following "pattern" applies
#models\scheduler.py
from gluon.scheduler i
yeah, i realize that something i'm lacked off, unfortunately, i don't know
where is it. tried again using your code but still no luck
started from scratch
*models\db_wizard_0.py*
db.define_table('asdf',
Field('asdf'),
auth.signature )
*models\scheduler.py*
from gluon.scheduler import Sc
ok. steps.
web2py.py -a yourpassword
go to /appname/test/queue_task
go to /appname/appadmin/select/db?query=db.scheduler_task.id>0
if nothing is there, then in controller test.py the function queue_task is
not queuing the task.
if a single row is there, then, open a terminal and start the sch
yes, followed your step, i understood the logic flow of the web2py
scheduler and made it work, thank you so much, simone for the pointers.
just wondering, the precision for second is not exact on created_on, tested
using period = 5 and period = 60
here is the steps i took :
*cmd*
cd C:\web2py\ap
On Thursday, June 26, 2014 11:17:21 PM UTC+2, 黄祥 wrote:
>
> yes, followed your step, i understood the logic flow of the web2py
> scheduler and made it work, thank you so much, simone for the pointers.
> just wondering, the precision for second is not exact on created_on, tested
> using period
a, i understood, the puzzle completed now. thank you so much, simone, for
detail explaination about web2py scheduler.
thanks and best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.
10 matches
Mail list logo