Added preparing the database for saving scheaduled tasks.