diff --git a/src/snek/app.py b/src/snek/app.py
index 7c0f0b0..67beb5d 100644
--- a/src/snek/app.py
+++ b/src/snek/app.py
@@ -81,10 +81,12 @@ class Application(BaseApplication):
     async def task_runner(self):
         while True:
             task = await self.tasks.get() 
+            self.db.begin()
             try:
                 await task
             except Exception as ex:
                 print(ex)
+            self.db.commit()
 
     async def prepare_database(self,app):
         self.db.query("PRAGMA journal_mode=WAL")