added databsase support and cron runs