Hello, I am trying to use scheduler for the first time in my app and I 
cannot get it to work. Tables for scheduler are never really created. This 
is my model scheduler.py:

from gluon.scheduler import Scheduler
from gluon import current

scheduler = Scheduler(
 storage.mailer_db,
 tasks={'send_email': Sender(db).send()},
 utc_time=True)
current.scheduler = scheduler

Now, when I get to schedule a task like this
scheduler.queue_task(
    'send_email',
    pvars={'queue_id': some_id},
    start_time=datetime.datetime.utcnow(),
    stop_time=datetime.datetime.utcnow() + datetime.timedelta(seconds=600),
    application_name="app")

Noting really happens, also worth nothing when I try to start workers with 
python web2py.py -K app
I get this error:
NameError: global name 'urllib' is not defined
Any idea on what I might be doing wrong? Thank you!

-- 
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