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

- old
+ new

@@ -1,6 +1,6 @@ -Clockwork - a clock process to replace cron +Clockwork - a clock process to replace cron [![Build Status](https://secure.travis-ci.org/tomykaira/clockwork.png?branch=master)](http://travis-ci.org/tomykaira/clockwork) =========================================== Cron is non-ideal for running scheduled application tasks, especially in an app deployed to multiple machines. [More details.](http://adam.heroku.com/past/2010/4/13/rethinking_cron/) @@ -147,10 +147,16 @@ This argument cannot be omitted. Please use _ as placeholder if not needed. Clockwork.every(1.second, 'myjob', :if => lambda { |_| true }) +### :thread + +A handler with `:thread` parameter runs in a different thread. + +If a job is long running or IO-intensive, this option will be useful to keep the clock precise. + Configuration ----------------------- Clockwork exposes a couple of configuration options you may change: @@ -168,16 +174,22 @@ ### :tz This is the default timezone to use for all events. When not specified this defaults to the local timezone. Specifying :tz in the the parameters for an event overrides anything set here. +### :max_threads + +Clockwork runs handlers in threads. If it exceeds `max_threads`, it will warn you about missing +jobs. + ### Configuration example Clockwork.configure do |config| config[:sleep_timeout] = 5 config[:logger] = Logger.new(log_file_path) config[:tz] = 'EST' + config[:max_threads] = 15 end Anatomy of a clock file ----------------------- @@ -249,10 +261,10 @@ Meta ---- Created by Adam Wiggins -Inspired by [rufus-scheduler](http://rufus.rubyforge.org/rufus-scheduler/) and [resque-scehduler](http://github.com/bvandenbos/resque-scheduler) +Inspired by [rufus-scheduler](http://rufus.rubyforge.org/rufus-scheduler/) and [resque-scheduler](http://github.com/bvandenbos/resque-scheduler) Design assistance from Peter van Hardenberg and Matthew Soldo Patches contributed by Mark McGranaghan and Lukáš Konarovský