added goal query to scheduler.js