I have created a *scheduler.py *in /models/ which looks something like this:
def my_function(): ### function body ### scheduler = Scheduler(db) scheduler.queue_task( function='my_function', task_name = 'my_function', repeats = 0, # unlimited runs period = 300 # every 5 minutes ) The problem I'm seeing is that multiple tasks are being created in the database for this one function at totally incorrect *next_run_time* with respect to *start_time* and *period*. The multiple tasks created in the db are also not at the correct time interval apart. In addition, changing the repeat value to something other than zero has not effect, tasks continue to be created and executed unrelentingly according to what I see in the database. I am very keen to use the Scheduler, it seems like an elegant solution to what I'm trying to do but with all these tasks sprouting and executing at (what appears to be) random it is basically broken. Apologies if I misunderstood the usage of the scheduler, I was proceeding as close as I could to what I deciphered from the book. Thanks in advance for the help! --