<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -25,9 +25,10 @@ module RCron
           begin
             puts 'interval...'
             @jobs.each do |job|
-              p job
+              job.task.call if job.excutable?
             end
           rescue =&gt; e
+            raise e
           end
           sleep 1
         end
@@ -42,6 +43,22 @@ module RCron
     def initialize(schedule,task)
       self.schedule, self.task = schedule, task
     end
+    def excutable?
+      now = Time.now
+      min, hour, day, month, wday = schedule.to_s.split(/\s/)
+      if wday == '*' or wday.to_i == now.wday
+        if month == '*' or month.to_i == now.month
+          if day == '*' or day.to_i == now.day
+            if hour == '*' or hour.to_i == now.hour
+              if min == '*' or min.to_i == now.min
+                return true
+              end
+            end
+          end
+        end
+      end
+      false
+    end
   end
   
 end</diff>
      <filename>lib/rcron.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a2e03e5de62d1428ac39a2173d8086ae4a8a5459</id>
    </parent>
  </parents>
  <author>
    <name>func09</name>
    <email>mitsuru.haga@gmail.com</email>
  </author>
  <url>http://github.com/func09/rcron/commit/7774572c28b3d7aee25f9292509310d7f0dfc917</url>
  <id>7774572c28b3d7aee25f9292509310d7f0dfc917</id>
  <committed-date>2009-06-04T00:58:59-07:00</committed-date>
  <authored-date>2009-06-04T00:58:59-07:00</authored-date>
  <message>&#12472;&#12519;&#12502;&#12434;&#23455;&#34892;&#12377;&#12427;&#12363;&#21028;&#23450;&#12377;&#12427;&#12424;&#12358;&#12395;&#12394;&#12387;&#12383;

&#12392;&#12426;&#12354;&#12360;&#12378;*&#12392;&#25968;&#20516;&#12399;&#29702;&#35299;&#12375;&#12383;</message>
  <tree>ab29b937df01c068e1abc12be874625b6a4b2125</tree>
  <committer>
    <name>func09</name>
    <email>mitsuru.haga@gmail.com</email>
  </committer>
</commit>
