README.md in rufus-scheduler-3.9.0 vs README.md in rufus-scheduler-3.9.1

- old
+ new

@@ -513,10 +513,22 @@ [:in, 2014-01-22 22:21:27 +0900, 1390396887.651686] [:in, 2014-01-22 22:21:30 +0900, 1390396890.6571937] ... ``` +### :first_at_no_error + +In some heavy-duty configurations, the `:first_at` setting might be set on a point of time before the actual scheduling/triggering occurs and will result in an error `"cannot set first[_at|_in] in the past..."`. To prevent that, the `:first_at_no_error` option may be set to true. + +```ruby +scheduler.every '10h', first_at: Time.now + 10, first_at_no_error: true do + # ... +end +``` + +As introduced in [gh-342](https://github.com/jmettraux/rufus-scheduler/pull/342). + ### :last_at, :last_in, :last This option is for repeat jobs (cron / every) only. It indicates the point in time after which the job should unschedule itself. @@ -1643,9 +1655,29 @@ or by manually requiring it before requiring rufus-scheduler (if you don't use Bundler): ```ruby require 'tzinfo/data' require 'rufus-scheduler' ``` + +### Timezone in the schedule thread + +Currently (3.9.x), rufus-scheduler strives to trigger at the right time. The trigger thread might not yield a `Time.now` in the scheduled timezone. + +```ruby +ENV['TZ'] = 'Asia/Tokyo' + +require 'rufus-scheduler' + +s = Rufus::Scheduler.new + +s.cron('*/5 * * * * * Europe/Rome') do + p Time.now # ==> the representation will indicate the time is UTC+0900... +end + +s.join +``` + +In the wake of [gh-341](https://github.com/jmettraux/rufus-scheduler/issues/341). ## so Rails? Yes, I know, all of the above is boring and you're only looking for a snippet to paste in your Ruby-on-Rails application to schedule...