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

- old
+ new

@@ -28,12 +28,10 @@ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. #++ # -# $Id: definitions.rb 2725 2006-06-02 13:26:32Z jmettraux $ -# # # "made in Japan" # # John Mettraux at openwfe.org @@ -599,10 +597,12 @@ # only consider cron entries at the second 0 of a # minute @last_cron_minute = minute + #puts "step() @cron_entries.size #{@cron_entries.size}" + @cron_entries.each do |cron_id, cron_entry| #puts "step() cron_id : #{cron_id}" trigger(cron_entry) if cron_entry.matches? now end end @@ -727,12 +727,12 @@ def initialize (cron_id, line, &block) super(cron_id, &block) - if line.kind_of? String + if line.kind_of?(String) @cron_line = CronLine.new(line) - elsif line.kind_of? CronLine + elsif line.kind_of?(CronLine) @cron_line = line else raise \ "Cannot initialize a CronEntry " + "with a param of class #{line.class}"