private void scheduleCronJob(String cronString, String elementId) {
        try {
            SchedulerFactory schedulerFactory = new StdSchedulerFactory();
            scheduler = schedulerFactory.getScheduler();
            jobName = "TriggerJob_" + elementId;
            JobKey jobKey = new JobKey(jobName, jobGroup);

            if (scheduler.checkExists(jobKey)) {
                scheduler.deleteJob(jobKey);
            }
            scheduler.start();
            JobDataMap dataMap = new JobDataMap();
            dataMap.put("trigger", this);

            JobDetail job = org.quartz.JobBuilder.newJob(CronTrigger.class)
                    .withIdentity(jobName, jobGroup)
                    .usingJobData(dataMap)
                    .build();

            org.quartz.Trigger trigger = org.quartz.TriggerBuilder.newTrigger()
                    .withIdentity("TriggerJob_" + elementId, jobGroup)
                    .withSchedule(CronScheduleBuilder.cronSchedule(cronString))
                    .build();

            scheduler.scheduleJob(job, trigger);

        } catch (SchedulerException e) {
            log.error(ExceptionUtil.getMessageWithContext(e, siddhiAppContext) +
                    " Error while instantiating quartz scheduler for trigger '" + triggerDefinition.getId() + "'.", e);
        }
    }
This will be called only once and this can be used to release
the acquired resources for processing.
This will be called before shutting down the system.
modules/siddhi-core/src/main/java/io/siddhi/core/trigger/CronTrigger.java