'Runs the thread'

def run(self):

    try:
        while (not self.stop.is_set()):
            if self.enable:
                current_time = datetime.datetime.now()
                should_run = False
                if self.force:
                    should_run = True
                elif ((current_time - self.lastRun) >= self.cycleTime):
                    if (self.start_time is not None):
                        hour_diff = (current_time.time().hour - self.start_time.hour)
                        if ((not (hour_diff < 0)) and (hour_diff < (self.cycleTime.seconds / 3600))):
                            should_run = True
                        else:
                            self.lastRun = current_time
                    else:
                        should_run = True
                if should_run:
                    self.lastRun = current_time
                    if (not self.silent):
                        logger.log((u'Starting    new    thread:    ' + self.name), logger.DEBUG)
                    self.action.run(self.force)
                if self.force:
                    self.force = False
            time.sleep(1)
        self.stop.clear()
    except Exception as e:
        logger.log((((u'Exception    generated    in    thread    ' + self.name) + u':    ') + ex(e)), logger.ERROR)
        logger.log(repr(traceback.format_exc()), logger.DEBUG)
