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_table('asdf',
Field('asdf'),
auth.signature )
*controllers/scheduler.py*
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', prevent_drift = True,
repeats = 0, period = 5)
it seems the scheduler is execute everytime i access
http://127.0.0.1:8000/test/scheduler/demo1, and i think it's not a
scheduler, it's manually execute.
any idea how to achieve it using web2py way?
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 [email protected].
For more options, visit https://groups.google.com/d/optout.