public static Scheduler parse(Schedulable singleThreadEntryValve, SiddhiQueryContext siddhiQueryContext) {

        Scheduler scheduler = new Scheduler(singleThreadEntryValve, siddhiQueryContext);
        siddhiQueryContext.getSiddhiAppContext().addScheduler(scheduler);
        siddhiQueryContext.getSiddhiAppContext().addEternalReferencedHolder(scheduler);
        return scheduler;
    }
Create Scheduler object.

@param singleThreadEntryValve Schedulable
@param siddhiQueryContext     SiddhiAppContext
@return Scheduler instance
modules/siddhi-core/src/main/java/io/siddhi/core/util/parser/SchedulerParser.java