Get Hubot to talk at a certain time?
问题 I'm thinking about making a Hubot clock-based notifier (think "It's 5, time to go home!" but less annoying and for a different reason). What's the best way to go about doing something like this in a Hubot script? [ edit ] Here's an example using node-cron: TIMEZONE = "America/New_York" QUITTING_TIME = '0 0 17 * * 2-6' # M-F 5pm ROOM = "Dev" cronJob = require('cron').CronJob module.exports = (robot) -> gohome = new cronJob QUITTING_TIME, -> robot.messageRoom ROOM, "It's 5! Go home!" null true