tron.scheduler module

Tron schedulers

A scheduler has a simple interface.

class Scheduler(object):

schedule_on_complete = <bool>

def next_run_time(self, last_run_time):

<returns datetime>

next_run_time() should return a datetime which is the time the next job run will be run.

schedule_on_complete is a bool that identifies if this scheduler should have jobs scheduled with the start_time of the previous run (False), or the end time of the previous run (False).

class tron.scheduler.GeneralScheduler(ordinals=None, weekdays=None, months=None, monthdays=None, timestr=None, minutes=None, hours=None, seconds=None, time_zone=None, name=None, original=None, jitter=None)

Bases: object

Scheduler which uses a TimeSpecification.

get_jitter()
get_name()
get_value()
next_run_time(start_time)

Find the next time to run.

schedule_on_complete = False
tron.scheduler.get_jitter(time_delta)
tron.scheduler.get_jitter_str(time_delta)
tron.scheduler.scheduler_from_config(config, time_zone)

A factory for creating a scheduler from a configuration object.