def schedule_jobs(self):
        """Schedule or remove jobs as needed.

        Checks to see if there are any jobs that needs to be scheduled, after refreshing the database configuration
        as well as the list of collectors and auditors.

        Returns:
            `None`
        """
        self.dbconfig.reload_data()
        self.collectors = {}
        self.auditors = []
        self.load_plugins()

        _, accounts = BaseAccount.search(include_disabled=False)
        current_jobs = self.list_current_jobs()
        new_jobs = []
        batch_id = str(uuid4())

        batch = SchedulerBatch()
        batch.batch_id = batch_id
        batch.status = SchedulerStatus.PENDING
        db.session.add(batch)
        db.session.commit()

        start = datetime.now() + timedelta(seconds=1)
        job_delay = dbconfig.get('job_delay', self.ns, 0.5)

        # region Global collectors (non-aws)
        if CollectorType.GLOBAL in self.collectors:
            for worker in self.collectors[CollectorType.GLOBAL]:
                job_name = get_hash(worker)

                if job_name in current_jobs:
                    continue

                self.scheduler.add_job(
                    self.send_worker_queue_message,
                    trigger='interval',
                    name=job_name,
                    minutes=worker.interval,
                    start_date=start,
                    kwargs={
                        'batch_id': batch_id,
                        'job_name': job_name,
                        'entry_point': worker.entry_point,
                        'worker_args': {}
                    }
                )
                start += timedelta(seconds=job_delay)
        # endregion

        # region AWS collectors
        aws_accounts = list(filter(lambda x: x.account_type == AWSAccount.account_type, accounts))
        if CollectorType.AWS_ACCOUNT in self.collectors:
            for worker in self.collectors[CollectorType.AWS_ACCOUNT]:
                for account in aws_accounts:
                    job_name = get_hash((account.account_name, worker))
                    if job_name in current_jobs:
                        continue

                    new_jobs.append(job_name)

                    self.scheduler.add_job(
                        self.send_worker_queue_message,
                        trigger='interval',
                        name=job_name,
                        minutes=worker.interval,
                        start_date=start,
                        kwargs={
                            'batch_id': batch_id,
                            'job_name': job_name,
                            'entry_point': worker.entry_point,
                            'worker_args': {
                                'account': account.account_name
                            }
                        }
                    )
                    start += timedelta(seconds=job_delay)

        if CollectorType.AWS_REGION in self.collectors:
            for worker in self.collectors[CollectorType.AWS_REGION]:
                for region in AWS_REGIONS:
                    for account in aws_accounts:
                        job_name = get_hash((account.account_name, region, worker))

                        if job_name in current_jobs:
                            continue

                        new_jobs.append(job_name)

                        self.scheduler.add_job(
                            self.send_worker_queue_message,
                            trigger='interval',
                            name=job_name,
                            minutes=worker.interval,
                            start_date=start,
                            kwargs={
                                'batch_id': batch_id,
                                'job_name': job_name,
                                'entry_point': worker.entry_point,
                                'worker_args': {
                                    'account': account.account_name,
                                    'region': region
                                }
                            }
                        )
                        start += timedelta(seconds=job_delay)
        # endregion

        # region Auditors
        if app_config.log_level == 'DEBUG':
            audit_start = start + timedelta(seconds=5)
        else:
            audit_start = start + timedelta(minutes=5)

        for worker in self.auditors:
            job_name = get_hash((worker,))
            if job_name in current_jobs:
                continue

            new_jobs.append(job_name)

            self.scheduler.add_job(
                self.send_worker_queue_message,
                trigger='interval',
                name=job_name,
                minutes=worker.interval,
                start_date=audit_start,
                kwargs={
                    'batch_id': batch_id,
                    'job_name': job_name,
                    'entry_point': worker.entry_point,
                    'worker_args': {}
                }
            )
            audit_start += timedelta(seconds=job_delay)
Schedule or remove jobs as needed.

        Checks to see if there are any jobs that needs to be scheduled, after refreshing the database configuration
        as well as the list of collectors and auditors.

        Returns:
            `None`