# python web2py.py -K appname
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2018
Version 2.16.1-stable+timestamp.2017.11.13.23.50.07
Database drivers available: sqlite3, imaplib, pyodbc, pg8000
starting single-scheduler for "appname"...
ERROR:web2py.scheduler.appname-web2py-deploy-6cff4bdbf4-kz6h2#580:Error retrieving status
Traceback (most recent call last):
File "/web2py/gluon/scheduler.py", line 1168, in send_heartbeat
mybackedstatus = db(sw.worker_name == self.worker_name).select().first()
File "/usr/local/lib/python2.7/site-packages/pydal/objects.py", line 2250, in select
return adapter.select(self.query, fields, attributes)
File "/usr/local/lib/python2.7/site-packages/pydal/adapters/base.py", line 762, in select
return self._select_aux(sql, fields, attributes, colnames)
File "/usr/local/lib/python2.7/site-packages/pydal/adapters/base.py", line 718, in _select_aux
rows = self._select_aux_execute(sql)
File "/usr/local/lib/python2.7/site-packages/pydal/adapters/base.py", line 712, in _select_aux_execute
self.execute(sql)
File "/usr/local/lib/python2.7/site-packages/pydal/adapters/__init__.py", line 67, in wrap
return f(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pydal/adapters/base.py", line 412, in execute
rv = self.cursor.execute(command, *args[1:], **kwargs)
ProgrammingError: ('42S02', u"[42S02] [FreeTDS][SQL Server]Invalid object name 'scheduler_worker'. (208) (SQLExecDirectW)")
We're using MS SQL for main app storage and scheduler storage.
In the database, the scheduler_task table exists, but there are no other scheduler_* tables. In the databases/ directory there is a ....scheduler_task.table, but no other scheduler_*.table files.
The scheduler is instantiated from a module in models like this. I think this is pretty standard:
Could someone suggest some troubleshooting steps to figure out why the scheduler_worker table is not created?