Massimo, Ok here's what I did
1. Delete existing "scheduler" application. 2. Stop web2py (rocket) 3. Edit gluon/scheduler.py and at line 289 replace default = request.current.application with default = None (this is in the table definition of scheduler_task). 4. Start web2py 5. create new "scheduler" app 6. create models/scheduler.py using example code from gluon/scheduler.py. 7. Did NOT schedule any tasks. 8. Run python web2py.py -K scheduler *Results:* Doesn't look like it's working right - again it started to load a whole bunch of new python processes. I did ctrl+c to kill them off after the first 8 had started. I went and looked in the database (sqlite) to see if the tables had been defined and if at least a worker had checked in - the database tables had not been successfully defined. *Here is the full output:* Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.98.2 (2011-09-03 22:19:50) Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB starting scheduler for "scheduler"... web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.98.2 (2011-09-03 22:19:50) Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB starting scheduler for "scheduler"... web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.98.2 (2011-09-03 22:19:50) Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB starting scheduler for "scheduler"... web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.98.2 (2011-09-03 22:19:50) Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB starting scheduler for "scheduler"... web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.98.2 (2011-09-03 22:19:50) Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB starting scheduler for "scheduler"... web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.98.2 (2011-09-03 22:19:50) Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB starting scheduler for "scheduler"... web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.98.2 (2011-09-03 22:19:50) Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB starting scheduler for "scheduler"... web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.98.2 (2011-09-03 22:19:50) Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB starting scheduler for "scheduler"... Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Python26\lib\multiprocessing\forking.py", line 341, in main prepare(preparation_data) File "C:\Python26\lib\multiprocessing\forking.py", line 456, in prepare '__parents_main__', file, path_name, etc File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\web2py. py", line 16, in <module> import gluon.widget File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\_ _init__.py", line 15, in <module> from globals import current File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\g lobals.py", line 19, in <module> from xmlrpc import handler File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\x mlrpc.py", line 8, in <module> """ KeyboardInterrupt DEBUG:root:defining tables (migrate=False) DEBUG:root:thread building own DAL object DEBUG:root:looping... DEBUG:root:defining tables (migrate=False) DEBUG:root: grabbing all queued tasks DEBUG:root:........recording heartbeat Traceback (most recent call last): File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py", line 214, in run exec(python_code, _env) File "<string>", line 1, in <module> File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 332, in loop MetaScheduler.loop(self) File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 226, in loop task = self.pop_task() File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 351, in pop_task logging.debug(' grabbed %s tasks' % number_grabbed) UnboundLocalError: local variable 'number_grabbed' referenced before assignment DEBUG:root:defining tables (migrate=False) DEBUG:root:looping... DEBUG:root:thread building own DAL object DEBUG:root: grabbing all queued tasks DEBUG:root:defining tables (migrate=False) Traceback (most recent call last): File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py", line 214, in run exec(python_code, _env) File "<string>", line 1, in <module> File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 332, in loop MetaScheduler.loop(self) File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 226, in loop task = self.pop_task() File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 351, in pop_task logging.debug(' grabbed %s tasks' % number_grabbed) UnboundLocalError: local variable 'number_grabbed' referenced before assignment DEBUG:root:defining tables (migrate=False) DEBUG:root:looping... DEBUG:root:thread building own DAL object DEBUG:root: grabbing all queued tasks DEBUG:root:defining tables (migrate=False) Traceback (most recent call last): File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py", line 214, in run exec(python_code, _env) File "<string>", line 1, in <module> File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 332, in loop MetaScheduler.loop(self) File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 226, in loop task = self.pop_task() File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 351, in pop_task logging.debug(' grabbed %s tasks' % number_grabbed) UnboundLocalError: local variable 'number_grabbed' referenced before assignment DEBUG:root:defining tables (migrate=False) DEBUG:root:thread building own DAL object DEBUG:root:looping... DEBUG:root:defining tables (migrate=False) DEBUG:root: grabbing all queued tasks TDraceback (most recent call last): File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py", line 214, in run exec(python_code, _env) File "<string>", line 1, in <module> File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 332, in loop MetaScheduler.loop(self) File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 226, in loop task = self.pop_task() File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 351, in pop_task logging.debug(' grabbed %s tasks' % number_grabbed) UnboundLocalError: local variable 'number_grabbed' referenced before assignment EBUG:root:........recording heartbeat DEBUG:root:defining tables (migrate=False) DEBUG:root:thread building own DAL object DEBUG:root:looping... DEBUG:root:defining tables (migrate=False) DEBUG:root: grabbing all queued tasks TDraceback (most recent call last): File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py", line 214, in run exec(python_code, _env) File "<string>", line 1, in <module> File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 332, in loop MetaScheduler.loop(self) File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 226, in loop task = self.pop_task() File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 351, in pop_task logging.debug(' grabbed %s tasks' % number_grabbed) UnboundLocalError: local variable 'number_grabbed' referenced before assignment EBUG:root:........recording heartbeat DEBUG:root:defining tables (migrate=False) DEBUG:root:thread building own DAL object DEBUG:root:looping... DEBUG:root:defining tables (migrate=False) DEBUG:root: grabbing all queued tasks TDraceback (most recent call last): File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py", line 214, in run exec(python_code, _env) File "<string>", line 1, in <module> File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 332, in loop MetaScheduler.loop(self) File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 226, in loop task = self.pop_task() File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 351, in pop_task logging.debug(' grabbed %s tasks' % number_grabbed) UnboundLocalError: local variable 'number_grabbed' referenced before assignment EBUG:root:........recording heartbeat DEBUG:root:defining tables (migrate=False) DEBUG:root:thread building own DAL object DEBUG:root:looping... DEBUG:root:defining tables (migrate=False) DEBUG:root: grabbing all queued tasks TDraceback (most recent call last): File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py", line 214, in run exec(python_code, _env) File "<string>", line 1, in <module> File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 332, in loop MetaScheduler.loop(self) File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 226, in loop task = self.pop_task() File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 351, in pop_task logging.debug(' grabbed %s tasks' % number_grabbed) UnboundLocalError: local variable 'number_grabbed' referenced before assignment EBUG:root:........recording heartbeat DEBUG:root:defining tables (migrate=False) DEBUG:root:thread building own DAL object DEBUG:root:looping... DEBUG:root:defining tables (migrate=False) DEBUG:root: grabbing all queued tasks DTEBUG:root:........recording heartbeat raceback (most recent call last): File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py", line 214, in run exec(python_code, _env) File "<string>", line 1, in <module> File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 332, in loop MetaScheduler.loop(self) File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 226, in loop task = self.pop_task() File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 351, in pop_task logging.debug(' grabbed %s tasks' % number_grabbed) UnboundLocalError: local variable 'number_grabbed' referenced before assignment DEBUG:root:defining tables (migrate=False) DEBUG:root:thread building own DAL object DEBUG:root:looping... DEBUG:root:defining tables (migrate=False) DEBUG:root: grabbing all queued tasks TDraceback (most recent call last): File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py", line 214, in run exec(python_code, _env) File "<string>", line 1, in <module> File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 332, in loop MetaScheduler.loop(self) File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 226, in loop task = self.pop_task() File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 351, in pop_task logging.debug(' grabbed %s tasks' % number_grabbed) UnboundLocalError: local variable 'number_grabbed' referenced before assignment EBUG:root:........recording heartbeat DEBUG:root:defining tables (migrate=False) DEBUG:root:thread building own DAL object DEBUG:root:looping... DEBUG:root:defining tables (migrate=False) DEBUG:root: grabbing all queued tasks TDraceback (most recent call last): File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py", line 214, in run exec(python_code, _env) File "<string>", line 1, in <module> File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 332, in loop MetaScheduler.loop(self) File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 226, in loop task = self.pop_task() File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 351, in pop_task logging.debug(' grabbed %s tasks' % number_grabbed) UnboundLocalError: local variable 'number_grabbed' referenced before assignment EBUG:root:........recording heartbeat DEBUG:root:defining tables (migrate=False) DEBUG:root:thread building own DAL object DEBUG:root:looping... DEBUG:root:defining tables (migrate=False) DEBUG:root: grabbing all queued tasks TDraceback (most recent call last): File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py", line 214, in run exec(python_code, _env) File "<string>", line 1, in <module> File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 332, in loop MetaScheduler.loop(self) File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 226, in loop task = self.pop_task() File "C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s cheduler.py", line 351, in pop_task logging.debug(' grabbed %s tasks' % number_grabbed) UnboundLocalError: local variable 'number_grabbed' referenced before assignment EBUG:root:........recording heartbeat C:\Users\Brian\Documents\development\web2py\google hg repo\trunk>