Last active
March 25, 2019 07:50
-
-
Save prashanth-sams/aa64724f840bdd9ca5243ec51e5f44af to your computer and use it in GitHub Desktop.
Hubot - Cron job 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CronJob = require("cron").CronJob | |
module.exports = robot => { | |
new CronJob( | |
"00 37 16 * * *", | |
function() { | |
try { | |
robot.messageRoom( | |
"general", `Hey Prashanth! You got a notification message now` | |
) | |
} catch (e) { | |
console.error(e) | |
} | |
}, | |
null, | |
true, | |
"Asia/Dubai" | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment