README.md in clockwork-0.6.1 vs README.md in clockwork-0.6.2

- old
+ new

@@ -151,10 +151,16 @@ ```ruby every(1.hour, 'reminders.send', :at => ['12:00', '18:00']) # send reminders at noon and evening ``` +You can specify the day of week to run: + +```ruby +every(1.week, 'myjob', :at => 'Monday 16:20') +``` + You can also specify a timezone (default is the local timezone): ```ruby every(1.day, 'reminders.send', :at => '00:00', :tz => 'UTC') # Runs the job each day at midnight, UTC. @@ -221,10 +227,27 @@ config[:tz] = 'EST' config[:max_threads] = 15 end ``` +### error_handler + +You can add error_handler to define your own logging or error rescue. + +```ruby +Clockwork.error_handler do |error| + Airbrake.notify_or_ignore(error) +end +``` + +Current specifications are as follows. + +- defining error_handler does not disable original logging +- errors from error_handler itself do not rescued, and stop clockwork + +Any suggestion about these specifications is welcome. + Anatomy of a clock file ----------------------- clock.rb is standard Ruby. Since we include the Clockwork module (the clockwork binary does this automatically, or you can do it explicitly), this @@ -304,10 +327,10 @@ Meta ---- Created by Adam Wiggins -Inspired by [rufus-scheduler](http://rufus.rubyforge.org/rufus-scheduler/) and [resque-scheduler](http://github.com/bvandenbos/resque-scheduler) +Inspired by [rufus-scheduler](https://github.com/jmettraux/rufus-scheduler) and [resque-scheduler](https://github.com/bvandenbos/resque-scheduler) Design assistance from Peter van Hardenberg and Matthew Soldo Patches contributed by Mark McGranaghan and Lukáš Konarovský