package com.pqs9900.task;

import org.quartz.CronScheduleBuilder;
import org.quartz.CronTrigger;
import org.quartz.TriggerBuilder;

public class MyTrigger {
    private CronTrigger cronTrigger;

    public MyTrigger(String name, String group, String cron) {
        cronTrigger = TriggerBuilder.newTrigger().withIdentity(name, group).startNow().withSchedule(
                CronScheduleBuilder.cronSchedule(cron)).build();
    }

    public CronTrigger getCronTrigger() {
        return cronTrigger;
    }
}
