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 documentation about web2py scheduler but 
> ended with result not expected for period and repeats.
> e.g.
> *models/scheduler.py*
> db.define_table('asdf',
>     Field('asdf'),
>     auth.signature    )
>
> from gluon.scheduler import Scheduler
>
> def demo1():
>     db.asdf.insert(asdf = 'asdf')
>     db.commit()
>
> scheduler = Scheduler(db, tasks = dict(demo1 = demo1) )
>
> scheduler.queue_task('demo1', 
>                      repeats = 0, period = 180)
>
> *running from windows command line :*
> cd C:\web2py
> python web2py.py -K test -X
>
> *result not expected*
> 1. db.asdf created on and modified on is not in period range. my 
> expectation is created on is every 3 minutes (180 seconds) according to 
> configuration above.
> 2. db.scheduler_task create a lot of records every something seconds.
>
> my question is how can i handle those 2 problems above?
>
> thanks and best regards,
> stifan
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to