Integrate clockwork gem with capistrano
Add this line to your application's Gemfile:
gem 'daemons'
gem 'capistrano-clockwork'
or:
gem 'daemons'
gem 'capistrano-clockwork', group: :development
Make sure the daemons gem is required in production. And then execute:
$ bundle
# Capfile
require 'capistrano/clockwork'
Configurable options, shown here with defaults: By default the gem expects a the clockwork script to be present in the lib folder
:clockwork_default_hooks = true
:clockwork_file = "lib/clockwork.rb"
:clockwork_role = :app
To override the defaults just change it in your Capfile
set :clockwork_file, "clockwork.rb"
By default the clockwork daemon is restarted everytime you deploy to your server
set :clockwork_default_hooks, false
By default the clockwork will be deployed with :app
role
set :clockwork_role, :app
By default the clockwork daemon is restarted everytime you deploy to your server
cap clockwork:restart #=> Restarts your clockwork instance
cap clockwork:stop #=> Stops the clockwork daemon
cap clockwork:status #=> Checks if clockwork daemon is running
cap clockwork:start #=> Starts the clockwork daemon
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- Build your gem using the rake command
rake build