I agree Scheduler is great.
I use this technique:
in modules/lib.py:
def a_func(db):
# some code
# ...
return
in models/scheduler.py
def a_func():
import lib
return lib.a_func(db)
from gluon.scheduler import Scheduler
scheduler = Scheduler(db)
in controllers/a_controller.py
def a_func:
import lib
return lib.a_func(db)
so the code is centralized in modules/lib.py and i can call the same code
from controller or scheduled task.
PB
--
---
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/groups/opt_out.