I've been unable to properly setup Hubot and node-cron to execute tasks within my IRC channels.
This page shows how I initially setup my code: https://leanpub.com/automation-and-monitoring-with-hubot/read#leanpub-auto-periodic-task-execution
Here is the link to node-cron: https://github.com/ncb000gt/node-cron
I'm thinking I'm running into an issue with Hubot's IRC adapter, but I'm not sure. Any advice and code examples would be welcome.
Here is where I've ended up in testing:
module.exports = (robot) ->
cronJob = require('cron').CronJob
tz = 'America/Minneapolis'
new cronJob('30 * * * * *', testFunction, true, tz)
room = '#support' #not used in this case
testFunction = ->
robot.send "I work!"
or per example from Leanpub
testFunction = ->
robot.messageRoom room "I work!"
cron jobs setup after Hubot is running work fine:
Hubot new job "<crontab format>" <message> - Schedule a cron job to say something
Thank you again, all!