lib/openwfe/util/scheduler.rb in openwferu-scheduler-0.9.12.826 vs lib/openwfe/util/scheduler.rb in openwferu-scheduler-0.9.13

- old
+ new

@@ -213,9 +213,21 @@ # Returns the a job_id that can be used to unschedule the job. # # This method returns a job identifier which can be used to unschedule() # the job. # + # If the job is specified in the past, it will be triggered immediately + # but not scheduled. + # To avoid the triggering, the parameter :discard_past may be set to + # true : + # + # jobid = scheduler.schedule_at(yesterday, :discard_past => true) do + # puts "you'll never read this message" + # end + # + # And 'jobid' will hold a nil (not scheduled). + # + # def schedule_at (at, params={}, &block) params = prepare_params(params) sschedule_at(at, params, &block)