def __init__(self, _callable, crontab, default_now=None, default_utc=None): _BaseTask.__init__(self, _callable) CronTab.__init__(self, crontab) self._default_now = default_now self._default_utc = default_utc
def __init__(self, specifier, timezone): """Construct a CrabSchedule object from a cron time specifier and the associated timezone name. The timezone string, if provided, is converted into an object using the pytz module.""" try: item = CronTab.__init__(self, specifier) except ValueError as err: raise CrabError('Failed to parse cron time specifier ' + specifier + ' reason: ' + str(err)) self.timezone = None if timezone is not None: try: # pytz returns the same object if called twice # with the same timezone, so we don't need to cache # the timezone objects by zone name. self.timezone = pytz.timezone(timezone) except pytz.UnknownTimeZoneError: logger.warning( 'Warning: unknown time zone {}'.format(timezone))
def __init__(self, specifier, timezone): """Construct a CrabSchedule object from a cron time specifier and the associated timezone name. The timezone string, if provided, is converted into an object using the pytz module.""" try: item = CronTab.__init__(self, specifier) except ValueError as err: raise CrabError('Failed to parse cron time specifier ' + specifier + ' reason: ' + str(err)) self.timezone = None if timezone is not None: try: # pytz returns the same object if called twice # with the same timezone, so we don't need to cache # the timezone objects by zone name. self.timezone = pytz.timezone(timezone) except pytz.UnknownTimeZoneError: print('Warning: unknown time zone', timezone)
def __init__(self, crontab, callback): CronTab.__init__(self, crontab) PeriodicCallback.__init__(self, callback, self.next(), IOLoop.current())
def __init__(self, _callable, crontab): _BaseTask.__init__(self, _callable) CronTab.__init__(self, crontab)
def __init__(self, crontab, callback): CronTab.__init__(self, crontab) PeriodicCallback.__init__(self, callback, self.next(), IOLoop.current())
def __init__(self, _callable, crontab): LoopTask.__init__(self, _callable, 0) CronTab.__init__(self, crontab)