run_scheduler never starts

Bug #1649169 reported by kavin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-crontab
Fix Committed
High
Martin Owens

Bug Description

the Crontab method run_scheduler does not start unless passing a timeout value. Running the example from the documentation does not start the loop.

I've been able to successfully execute the scheduler by passing the timeout as != 0

snippet of the method.

def run_scheduler(self, timeout=0, **kwargs):
 """Run the CronTab as an internal scheduler (generator)"""
 count = 0
 self.run_pending()
 while count != timeout:
  ...
  ...

Revision history for this message
Martin Owens (doctormo) wrote :

I've committed a fix, the timeout's default is now -1, which is no timeout. I've updated the documentation to describe the timeout too.

Changed in python-crontab:
assignee: nobody → Martin Owens (doctormo)
importance: Undecided → High
milestone: none → 2.2
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.