@mizuki_r/hubot-scheduler
v0.0.7
Published
Extension of hubot to execute scheduled task.
Downloads
3
Readme
hubot-scheduler
Extension of hubot to execute scheduled task.
suppuorted
thanks!
Install
npm i -S @mizuki_r/hubot-scheduler
yarn add @mizuki_r/hubot-scheduler
Example
in your hubot's script file.
module.exports = (robot) ->
# setup
require('hubot-scheduler')(robot)
robot.schedule
.register({
time: { hour: 7, minute: 30, dayOfWeek: {min: 1, max: 5} },
holiday: false,
envelope: { room: '#some-room' },
data: {
message: 'Good morning! Today is work!'
}
})
.onTime((envelope, data) =>
robot.send(envelope, data.message)
)
LICENSE
MIT