Added cron job, solved bug in latest readings query