database and task scheduler