    public void setupTrigger() throws SchedulerException {
        scheduler = new StdSchedulerFactory().getScheduler();
        Set<CronTaskEntity> allCronTasks = cronService.getAllCronTasks();
        for (CronTaskEntity cronTaskEntity : allCronTasks) {
            JobDataMap jobDataMap = new JobDataMap();
            jobDataMap.put("frequency", cronTaskEntity.getFrequency());
            JobDetail job = new JobDetail();
            job.setName(cronTaskEntity.getFrequency().getFrequencyName());
            job.setJobClass(IndicatorValueCalculatorJob.class);
            job.setJobDataMap(jobDataMap);
            Trigger trigger = prepareTrigger(cronTaskEntity);
            scheduler.scheduleJob(job, trigger);
        }
        scheduler.start();
        scheduler.shutdown(true);
    }

    public void setupTrigger() throws SchedulerException {
        scheduler = new StdSchedulerFactory().getScheduler();
        Set<CronTaskEntity> allCronTasks = cronService.getAllCronTasks();
        for (CronTaskEntity cronTaskEntity : allCronTasks) {
            JobDataMap jobDataMap = new JobDataMap();
            jobDataMap.put("frequency", cronTaskEntity.getFrequency());
            JobDetail job = new JobDetail();
            job.setName(cronTaskEntity.getFrequency().getFrequencyName());
            job.setJobClass(IndicatorValueCalculatorJob.class);
            job.setJobDataMap(jobDataMap);
            Trigger trigger = prepareTrigger(cronTaskEntity);
            scheduler.scheduleJob(job, trigger);
        }
        scheduler.start();
    }
