improve realtime support

add crontab and master script
update env2database to run just one date at a time