Robut::Cron
Schedule “message” posts via a cron-like interface from an XMPP/HipChat session.
Installation
Add this line to your application’s Gemfile:
gem 'robut-cron'
And then execute:
$ bundle
Or install it yourself as:
$ gem install robut-cron
Usage
The ‘Chatfile’: ``` # Require your plugins here require ‘robut/storage/yaml_store’ require ‘robut/plugin/help’ require ‘robut-cron’ # Add the plugin classes to the Robut plugin list. # Plugins are handled in the order that they appear in this array. Robut::Plugin.plugins « Robut::Plugin::Help Robut::Plugin.plugins « Robut::Plugin::Cron
Configure the robut jabber connection and you’re good to go!
Robut::Connection.configure do |config| # Note that the jid must end with /bot if you don’t want robut to # spam the channel, as described by the last bullet point on this # page: https://www.hipchat.com/help/category/xmpp config.jid = ‘[email protected]/bot’ config.password = ‘xxxxx’ config.nick = ‘Odd Job’ config.room = ‘[email protected]’
# Custom @mention name config.mention_name = ‘odd’
# Some plugins require storage Robut::Storage::YamlStore.file = “.robut” config.store = Robut::Storage::YamlStore
# Add a logger if you want to debug the connection config.logger = Logger.new(STDOUT) end ```
Hmmn. Something like this from inside the chat session.
”#at_nick cron new * * * * *
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request