I am using the following model for test the cron :

db.define_table(('emp'),
               Field('name'))
and in crontab file inside the welcome app i am using the :

*/1  *  *  *  * root *applications/welcome/modules/background_updater.py

and makes the file inside the modules folder background_updater.py and used
the code :

db.emp.insert(name = 'Alex')

this code is inserting the Alex in the table emp within 1 minutes interval

this code is working in the version of web2py 1.99.4 perfectly but when i
try this same code in the version 1.99.7 i got the following error :-

RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
  File "/home/tls-sanjeet/Desktop/web2py/gluon/dal.py", line 5955, in
__init__
    self._adapter = ADAPTERS[self._dbname](*args)
  File "/home/tls-sanjeet/Desktop/web2py/gluon/dal.py", line 1732, in
__init__
    self.pool_connection(connect)
  File "/home/tls-sanjeet/Desktop/web2py/gluon/dal.py", line 465, in
pool_connection
    self.connection = f()
  File "/home/tls-sanjeet/Desktop/web2py/gluon/dal.py", line 1731, in
connect
    return self.driver.Connection(dbpath, **driver_args)
OperationalError: unable to open database file

Reply via email to