README.md in clockwork-0.4.1 vs README.md in clockwork-0.5.0

- old
+ new

@@ -50,10 +50,17 @@ every(1.hour, 'hourly.job') every(1.day, 'midnight.job', :at => '00:00') end +If you need to load your entire environment for your jobs, simply add: + + require './config/boot' + require './config/environment' + +under the `require 'clockwork'` declaration. + Quickstart for Heroku --------------------- Clockwork fits well with heroku's cedar stack. @@ -67,12 +74,13 @@ to do the work. It avoids locking by running as a single process, but this makes it impossible to parallelize. For doing the work, you should be using a job queueing system, such as [Delayed Job](http://www.therailsway.com/2009/7/22/do-it-later-with-delayed-job), [Beanstalk/Stalker](http://adam.heroku.com/past/2010/4/24/beanstalk_a_simple_and_fast_queueing_backend/), -[RabbitMQ/Minion](http://adamblog.heroku.com/past/2009/9/28/background_jobs_with_rabbitmq_and_minion/), or -[Resque](http://github.com/blog/542-introducing-resque). This design allows a +[RabbitMQ/Minion](http://adamblog.heroku.com/past/2009/9/28/background_jobs_with_rabbitmq_and_minion/), +[Resque](http://github.com/blog/542-introducing-resque), or +[Sidekiq](https://github.com/mperham/sidekiq). This design allows a simple clock process with no locks, but also offers near infinite horizontal scalability. For example, if you're using Beanstalk/Staker: @@ -223,10 +231,23 @@ * App server 2: 3 web (thin start), 3 workers (rake jobs:work) You should use Monit, God, Upstart, or Inittab to keep your clock process running the same way you keep your web and workers running. +Daemonization +------------- + +Thanks to @fddayan, `clockworkd` executes clockwork script in as a daemon. + +You need `daemons` gem to use `clockworkd`. It is not automatically installed, please install by yourself. + +Then, + + clockworkd -c YOUR_CLOCK.rb start + +For more details, see help shown by `clockworkd`. + Meta ---- Created by Adam Wiggins @@ -237,6 +258,5 @@ Patches contributed by Mark McGranaghan and Lukáš Konarovský Released under the MIT License: http://www.opensource.org/licenses/mit-license.php http://github.com/tomykaira/clockwork -