'Run cron'

def run(self):

    while True:
        for job in self.jobs:
            try:
                job()
            except:
                if settings.DEBUG:
                    raise
                else:
                    import traceback
                    import sys
                    from treeio import core
                    from django.core.mail import mail_admins
                    (exc_type, exc_value, exc_traceback) = sys.exc_info()
                    subject = ((('Exception:    ' + 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')
                    mail_admins(subject, body)
        time.sleep(self.sleeptime)
