hubot-cron-json
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
- Fork (https://github.com/tcnksm/hubot-cron-json/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Create new Pull Request