README.md in clockwork-1.1.0 vs README.md in clockwork-1.2.0
- old
+ new
@@ -34,11 +34,11 @@
every(1.day, 'midnight.job', :at => '00:00')
end
```
-Run it with the clockwork binary:
+Run it with the clockwork executable:
```
$ clockwork clock.rb
Starting clock for 4 events: [ frequent.job less.frequent.job hourly.job midnight.job ]
Triggering frequent.job
@@ -267,10 +267,13 @@
```ruby
every(1.week, 'myjob', :at => 'Monday 16:20')
```
+If another task is already running at the specified time, clockwork will skip execution of the task with the `:at` option.
+If this is a problem, please use the `:thread` option to prevent the long running task from blocking clockwork's scheduler.
+
### :tz
`:tz` parameter lets you specify a timezone (default is the local timezone):
```ruby
@@ -298,15 +301,15 @@
Clockwork.every(1.second, 'myjob', :if => lambda { |_| true })
```
### :thread
-In default, clockwork runs in single-process, single-thread.
-If an event handler takes long time, the main routine of clockwork is blocked until it ends.
+By default, clockwork runs in a single-process and single-thread.
+If an event handler takes a long time, the main routine of clockwork is blocked until it ends.
Clockwork does not misbehave, but the next event is blocked, and runs when the process is returned to the clockwork routine.
-This `:thread` option is to avoid blocking. An event with `:thread => true` runs in a different thread.
+The `:thread` option is to avoid blocking. An event with `thread: true` runs in a different thread.
```ruby
Clockwork.every(1.day, 'run.me.in.new.thread', :thread => true)
```
@@ -388,10 +391,10 @@
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
+clockwork executable does this automatically, or you can do it explicitly), this
exposes a small DSL to define the handler for events, and then the events themselves.
The handler typically looks like this:
```ruby