cron job for refreshing database