# Path: libre/apps/scheduler/exceptions.py
# class AlreadyScheduled(Exception):
#     """
#     Raised when trying to schedule a Job instance of anything after it was
#     already scheduled in any other scheduler
#     """
#     pass
# 
# class UnknownJob(Exception):
#     pass
# 
# class UnknownJobClass(Exception):
#     """
#     Raised when trying to schedule a Job that is not of a a type:
#     IntervalJob or DateJob
#     """
#     pass


import logging
from apscheduler.scheduler import Scheduler as OriginalScheduler
from django.utils.translation import ugettext_lazy as _
from .exceptions import AlreadyScheduled, UnknownJob, UnknownJobClass
            raise AlreadyScheduled

        if self._scheduler:
            self._schedule_job(job)

        job.scheduler = self
        self.scheduled_jobs[job.name] = job

    def add_interval_job(self, name, label, function, *args, **kwargs):
        job = IntervalJob(name=name, label=label, function=function, *args, **kwargs)
        self.add_job(job)
        return job

    def add_date_job(self, name, label, function, *args, **kwargs):
        job = DateJob(name=name, label=label, function=function, *args, **kwargs)
        self.add_job(job)
        return job

    def add_cron_job(self, name, label, function, *args, **kwargs):
        job = CronJob(name=name, label=label, function=function, *args, **kwargs)
        self.add_job(job)
        return job

    def get_job_list(self):
        return self.scheduled_jobs.values()

    def get_job_by_name(self, name):
        try:
            return self.scheduled_jobs[name]
        except KeyError:

# Path: libre/apps/scheduler/exceptions.py
# class AlreadyScheduled(Exception):
#     """
#     Raised when trying to schedule a Job instance of anything after it was
#     already scheduled in any other scheduler
#     """
#     pass
# 
# class UnknownJob(Exception):
#     pass
# 
# class UnknownJobClass(Exception):
#     """
#     Raised when trying to schedule a Job that is not of a a type:
#     IntervalJob or DateJob
#     """
#     pass


# Path: libre/apps/scheduler/classes.py
import logging
from apscheduler.scheduler import Scheduler as OriginalScheduler
from django.utils.translation import ugettext_lazy as _
from .exceptions import AlreadyScheduled, UnknownJob, UnknownJobClass

            raise AlreadyScheduled

        if self._scheduler:
            self._schedule_job(job)

        job.scheduler = self
        self.scheduled_jobs[job.name] = job

    def add_interval_job(self, name, label, function, *args, **kwargs):
        job = IntervalJob(name=name, label=label, function=function, *args, **kwargs)
        self.add_job(job)
        return job

    def add_date_job(self, name, label, function, *args, **kwargs):
        job = DateJob(name=name, label=label, function=function, *args, **kwargs)
        self.add_job(job)
        return job

    def add_cron_job(self, name, label, function, *args, **kwargs):
        job = CronJob(name=name, label=label, function=function, *args, **kwargs)
        self.add_job(job)
        return job

    def get_job_list(self):
        return self.scheduled_jobs.values()

    def get_job_by_name(self, name):
        try:
            return self.scheduled_jobs[name]
        except KeyError:

            raise UnknownJob