diff --git a/include/event-scheduler.h b/include/event-scheduler.h
index a99dbae..2055598 100644
--- a/include/event-scheduler.h
+++ b/include/event-scheduler.h
@@ -122,7 +122,7 @@
   // generator is needed only when this is a periodic task
   // two simple generators implementation (SimpleIntervalGenerator and RandomIntervalGenerator) are provided;
   // if user needs more complex pattern in the intervals between calls, extend class IntervalGenerator
-  PeriodicTask(const Callback &callback, const Tag &tag, const SchedulerPtr &scheduler, const IntervalGeneratorPtr &generator, int repeat = -1);
+  PeriodicTask(const Callback &callback, const Tag &tag, const SchedulerPtr &scheduler, const IntervalGeneratorPtr &generator);
   virtual ~PeriodicTask(){}
 
   // invoke callback, reset self and ask scheduler to schedule self with the next delay interval
@@ -133,18 +133,8 @@
   virtual void
   reset() _OVERRIDE;
 
-  void
-  setRepeatTimes(int repeat) { m_repeat = repeat; m_indefinite = (m_repeat > 0); }
-
-private:
-  // this is to deregister itself from scheduler automatically if not indefinite
-  void
-  deregisterSelf();
-
 private:
   IntervalGeneratorPtr m_generator;
-  int m_repeat;
-  bool m_indefinite;
 };
 
 struct SchedulerException : virtual boost::exception, virtual exception { };
diff --git a/src/event-scheduler.cpp b/src/event-scheduler.cpp
index 1c892d6..be67aad 100644
--- a/src/event-scheduler.cpp
+++ b/src/event-scheduler.cpp
@@ -79,11 +79,9 @@
   m_invoked = false;
 }
 
-PeriodicTask::PeriodicTask(const Callback &callback, const Tag &tag, const SchedulerPtr &scheduler, const IntervalGeneratorPtr &generator, int repeat)
+PeriodicTask::PeriodicTask(const Callback &callback, const Tag &tag, const SchedulerPtr &scheduler, const IntervalGeneratorPtr &generator)
              : Task(callback, tag, scheduler)
              , m_generator(generator)
-             , m_repeat(repeat)
-             , m_indefinite(m_repeat > 0)
 {
 }
 
@@ -94,22 +92,7 @@
   {
     m_callback();
     m_invoked = true;
-    if (m_indefinite)
-    {
-      m_scheduler->rescheduleTask(m_tag);
-    }
-    else
-    {
-      m_repeat--;
-      if (m_repeat > 0)
-      {
-        m_scheduler->rescheduleTask(m_tag);
-      }
-      else
-      {
-        deregisterSelf();
-      }
-    }
+    m_scheduler->rescheduleTask(m_tag);
   }
 }
 
@@ -121,12 +104,6 @@
   setTv(interval);
 }
 
-void
-PeriodicTask::deregisterSelf()
-{
-  m_scheduler->deleteTask(m_tag);
-}
-
 RandomIntervalGenerator::RandomIntervalGenerator(double interval, double percent, Direction direction)
                         : m_interval(interval)
                         , m_rng(time(NULL))
diff --git a/test/test-event-scheduler.cc b/test/test-event-scheduler.cc
index b827296..4642d95 100644
--- a/test/test-event-scheduler.cc
+++ b/test/test-event-scheduler.cc
@@ -37,17 +37,14 @@
 {
   SchedulerPtr scheduler(new Scheduler());
   IntervalGeneratorPtr generator(new SimpleIntervalGenerator(0.2));
-  IntervalGeneratorPtr randomGen(new RandomIntervalGenerator(0.05, 0.5));
 
   string tag1 = "hello";
   string tag2 = "world";
   string tag3 = "period";
-  string tag4 = "haha";
 
   TaskPtr task1(new OneTimeTask(boost::bind(func, tag1), tag1, scheduler, 0.5));
   TaskPtr task2(new OneTimeTask(boost::bind(func, tag2), tag2, scheduler, 0.5));
   TaskPtr task3(new PeriodicTask(boost::bind(func, tag3), tag3, scheduler, generator));
-  TaskPtr task4(new PeriodicTask(boost::bind(func, tag4), tag4, scheduler, randomGen, 5));
 
   scheduler->start();
   scheduler->addTask(task1);
@@ -72,14 +69,11 @@
   usleep(100000);
   scheduler->deleteTask(bind(matcher, _1));
   BOOST_CHECK_EQUAL(scheduler->size(), 1);
-  usleep(500000);
-
-  scheduler->addTask(task4);
-  usleep(500000);
+  usleep(1000000);
 
   scheduler->shutdown();
 
-  int hello = 0, world = 0, period = 0, haha = 0;
+  int hello = 0, world = 0, period = 0;
 
   map<string, int>::iterator it;
   it = table.find(tag1);
@@ -98,20 +92,12 @@
     period = it->second;
   }
 
-  it = table.find(tag4);
-  if (it != table.end())
-  {
-    haha = it->second;
-  }
-
   // added four times, canceled once before invoking callback
   BOOST_CHECK_EQUAL(hello, 3);
   // added two times, canceled once by matcher before invoking callback
   BOOST_CHECK_EQUAL(world, 1);
   // invoked every 0.2 seconds before deleted by matcher
   BOOST_CHECK_EQUAL(period, static_cast<int>((0.6 + 0.6 + 0.4 + 0.2 + 0.1) / 0.2));
-  // should be invoked 5 times exactly
-  BOOST_CHECK_EQUAL(haha, 5);
 
 }
 
