hubot-cron-json
Manage hubot cron job defined by json configuration
Last updated 6 years ago by tcnksm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hubot-cron-json 
SYNC missed versions from official npm registry.

hubot-cron-json NPM MIT License

Manage hubot cron job defined by json configuration file

Configuration

All you need to do is just creating ./conf/cron-tasks.json:

[
    {
        "time" : "0 30 9 * * 1-5 ",
        "msg" : "Good morning ! Let's start morning meeting !"
    },
    {
        "time": "0 45 17 * * 5 ",
        "event": "sample:task"
    }
]

hubot-cron-json automatically read configuration file and execute job when it's time to do. time syntax follows ordinal cron syntax, See http://crontab.org/.

You can define 2 types of task:

  • mgs - Just say it to your room.
  • event - Emit event and another hubot task get it and execute somethig.

And you can check all cron jobs:

hubot cron list

Install

To install, use npm:

$ npm install --save hubot-cron-json

And add hubot-cron-json to your external-scripts.json.

VS.

These are cool scripts which also manages cron jobs. But for storing jobs, they depend robot.brain (Redis). hubot-cron-json manage cron job by json configuraiton file. It's very easy to share same cron jobs to another team's hubot and to run anywhere without job setting. And hubot-cron-json can manage not only saying something to room but emitting event to invorke another hubot tasks.

Contribution

  1. Fork (https://github.com/tcnksm/hubot-cron-json/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Create new Pull Request

Author

tcnksm

Current Tags

  • 0.1.1                                ...           latest (6 years ago)

2 Versions

  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |