Hello, I'm using web2py 2.7.2. Is it possible to run a scheduler that's in a conditional model file? For example I have this in <app>/models/special/scheduler.py
""" def task(): ... return 1 from gluon.scheduler import Scheduler taskDB = DAL('sqlite://tasks.sqlite',pool_size=1,check_reserved=['all']) scheduler = Scheduler( taskDB, tasks={"My Task":task} ) """ I can then successfully enqueue tasks using appadmin. However, I can't start the scheduler from the commandline using either of these: ./web2py.py --nogui -K <app> ./web2py.py --nogui -K <app>/special The first command fails with an expected traceback that it can't find any scheduler: AttributeError: 'thread._local' object has no attribute '_scheduler' But the second command treats the whole argument as an application name: Application '<app>/special' doesn't exist, skipping Thanks in advance! Ian -- 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/groups/opt_out.