added database support and job scheduler