hubot-cron-commands
Cron job commands for hubot
Last updated 9 months ago by jackellenberger .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hubot-cron-commands 
SYNC missed versions from official npm registry.

hubot-cron-commands

hubot-cron-commands adds a cronjob system to hubot to schedule commands to be run by hubot on a specific date and time.

based heavily on / forked from miyagawa's hubot-cron.

Installation

Add hubot-cron-commands to your package.json, run npm install and add hubot-cron to external-scripts.json.

Add hubot-cron to your package.json dependencies.

"dependencies": {
  "hubot-cron-commands": "^0.2.0"
}

Add hubot-cron-commands to external-scripts.json.

> cat external-scripts.json
> ["hubot-cron-commands"]

If you want to specify timezones, you'll need to install the time module or place an entry for it in your package.json file.

npm install time

Usage

user> hubot new job "0 9 * * 1-5" "hubot echo Good morning everyone!"
hubot> Job 12345 created
...
hubot> Attempting to execute job 12345, crontab "0 9 * * 1-5" hubot echo Good morning everyone!
hubot> Good morning everyone!

user> hubot list jobs
hubot> (list of jobs)

user> hubot tz job 12345 America/Los_Angeles
hubot> Job 12345 updated to use America/Los_Angeles

user> hubot silence 12345
...
hubot> Good morning everyone!

user> hubot rm job 12345
hubot> Job 12345 removed

You can use any node-cron compatible crontab format to schedule messages. Registered message will be sent to the same channel where you created a job.

To persist the cron job in the hubot restart, you're recommended to use redis to persist Hubot brain.

Timezones are specified in tzdata format.

Current Tags

  • 0.3.0                                ...           latest (9 months ago)

6 Versions

  • 0.3.0                                ...           9 months ago
  • 0.2.2                                ...           10 months ago
  • 0.2.1                                ...           10 months ago
  • 0.2.0                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |