def run(self):
        signal.signal(signal.SIGTERM, self.sigterm)
        setup_domain(self.database)
        cronlogger = logging.getLogger('CronLogger')
        cronlogger.debug('JOB - Starting ' + unicode(self))
        try:
            self.job()
        except __HOLE__:
            self._stopped = True
        except SystemExit:
            self._stopped = True
        except:
            import traceback
            from hardtree import core
            from django.core.mail import mail_admins
            exc_type, exc_value, exc_traceback = sys.exc_info()
            subject = "CRON Exception for " + \
                unicode(self) + ": " + unicode(exc_type) + \
                " " + unicode(exc_value)
            body = subject + "\n\n"
            body += unicode(core.__file__) + "\n\n"
            for s in traceback.format_tb(exc_traceback):
                body += s + '\n'
            cronlogger.error(subject + '\n' + body)
            mail_admins(subject, body)
        cronlogger.debug('JOB - Finished ' + unicode(self))
dataset/ETHPy150Open treeio/treeio/treeio/core/management/commands/runcron.py/CronJob.run