examples/scheduler_cron_usage.rb in openwferu-0.9.10.653 vs examples/scheduler_cron_usage.rb in openwferu-0.9.11
- old
+ new
@@ -1,10 +1,12 @@
#
# showing how to use the scheduler
#
+require 'rubygems'
+
require 'time'
require 'openwfe/util/scheduler'
include OpenWFE
@@ -32,10 +34,10 @@
i = i + 1
end
scheduler.schedule_in("2m10s") do
p "after 2 minutes and 10 seconds stopping the scheduler and exiting..."
- scheduler.do_stop
+ scheduler.stop
end
#
# using a regular "at" job to stop the scheduler after 4 minutes
scheduler.join