I found that under linux I was able to get the scheduler to successfully run a task by making sure os.environ['WEB2PY-PATH'] was defined. What I did was edit gluon/scheduler.py and change lines 61-62 from if 'WEB2PY_PATH' in os.environ: sys.path.append(os.environ['WEB2PY_PATH']) to if 'WEB2PY_PATH' in os.environ: sys.path.append(os.environ['WEB2PY_PATH']) else: os.environ['WEB2PY_PATH'] = os.environ['PWD']
Of course that'll only work if you're launching web2py from its own folder. (i.e. *python web2py.py -K scheduler* will work but *python web2py/web2py.py -K scheduler* will not). So a better patch than mine is definitely in order, but at least we know the scheduler can actually work :) ~Brian