0.0.7 • Published 3 years ago

@mizuki_r/hubot-scheduler v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

hubot-scheduler

Extension of hubot to execute scheduled task.

npm version

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