README.rdoc in rufus-scheduler-2.0.9 vs README.rdoc in rufus-scheduler-2.0.10
- old
+ new
@@ -156,11 +156,11 @@
p Rufus.to_time_string 60 # => "1m"
p Rufus.to_time_string 3661 # => "1h1m1s"
p Rufus.to_time_string 7 * 24 * 3600 # => "1w"
-== :blocking
+== :blocking => true
Jobs will, by default, trigger in their own thread. This is usually desirable since one expects the scheduler to continue scheduling even if a job is currently running.
Jobs scheduled with the :blocking parameter will run in the thread of the scheduler, blocking it.
@@ -171,9 +171,30 @@
scheduler.in '21m' do
puts "order espresso"
end
Hence, our espresso will come in 22 minutes instead of 21.
+
+
+== :allow_overlapping => false
+
+By default, every and cron jobs will "overlap" :
+
+ scheduler.every '3s' do
+ 4.times do
+ puts "hello!"
+ sleep 1
+ end
+ end
+
+This every job, will have overlaps. To prevent that :
+
+ scheduler.every '3s', :allow_overlapping => false do
+ 4.times do
+ puts "hello!"
+ sleep 1
+ end
+ end
== 'every' jobs and :first_at / :first_in
This job will execute every 3 days, but first time will be in 5 days from now :