Package org.quartz

Examples of org.quartz.SimpleTrigger


        try {
            JobDetail jobDetail = getJobDetail(jobName);

            if (jobDetail != null) {
                SimpleTrigger trigger  = (SimpleTrigger)
                    getScheduler().getTrigger(jobName, TRIGGER_GROUP_NAME);

                return new JobAndSimpleTrigger(jobDetail, (SimpleTrigger) trigger, getScheduler());

            } else {
View Full Code Here


    protected JobDetail createJobDetail() {
        return new JobDetail();
    }

    protected Trigger createTrigger() {
        return new SimpleTrigger();
    }
View Full Code Here

        QuartzEndpoint endpoint = resolveMandatoryEndpoint("quartz://myGroup/myName?trigger.repeatCount=3");
        Trigger trigger = endpoint.getTrigger();
        assertEquals("getName()", "myName", trigger.getName());
        assertEquals("getGroup()", "myGroup", trigger.getGroup());

        SimpleTrigger simpleTrigger = assertIsInstanceOf(SimpleTrigger.class, trigger);
        assertEquals("getRepeatCount()", 3, simpleTrigger.getRepeatCount());
    }
View Full Code Here

        // create the trigger either cron or simple
        if (ObjectHelper.isNotEmpty(cron)) {
            trigger = createCronTrigger(cron);
        } else {
            trigger = new SimpleTrigger();
            if (fireNow) {
                String intervalString = (String) triggerParameters.get("repeatInterval");
                if (intervalString != null) {
                    long interval = Long.valueOf(intervalString);
                    trigger.setStartTime(new Date(System.currentTimeMillis() - interval));
View Full Code Here

        // create the trigger either cron or simple
        if (ObjectHelper.isNotEmpty(cron)) {
            trigger = createCronTrigger(cron);
        } else {
            trigger = new SimpleTrigger();
            if (fireNow) {
                String intervalString = (String) triggerParameters.get("repeatInterval");
                if (intervalString != null) {
                    long interval = Long.valueOf(intervalString);
                    trigger.setStartTime(new Date(System.currentTimeMillis() - interval));
View Full Code Here

   }

   public void addJob(JobInfo jinfo, Date date) throws Exception
   {
      JobInfo jobinfo = getJobInfo(jinfo);
      SimpleTrigger trigger = new SimpleTrigger(jobinfo.getJobName(), jobinfo.getGroupName(), date);
      JobDetail job = new JobDetail(jobinfo.getJobName(), jobinfo.getGroupName(), jobinfo.getJob());
      job.setDescription(jinfo.getDescription());
      scheduler_.scheduleJob(job, trigger);
   }
View Full Code Here

      else if (repeatCount == 0)
         repeat = SimpleTrigger.REPEAT_INDEFINITELY;
      else
         repeat = repeatCount - 1;
      JobInfo jobinfo = getJobInfo(jinfo);
      SimpleTrigger trigger = new SimpleTrigger(jobinfo.getJobName(), jobinfo.getGroupName(), repeat, period);
      JobDetail job = new JobDetail(jobinfo.getJobName(), jobinfo.getGroupName(), jobinfo.getJob());
      job.setDescription(jobinfo.getDescription());
      scheduler_.scheduleJob(job, trigger);
   }
View Full Code Here

         start = new Date();
      if (repeat <= 0)
         repeat = SimpleTrigger.REPEAT_INDEFINITELY;
      else
         repeat = repeat - 1;
      SimpleTrigger trigger =
         new SimpleTrigger(jobinfo.getJobName(), jobinfo.getGroupName(), start, pinfo.getEndTime(), repeat, pinfo
            .getRepeatInterval());
      JobDetail job = new JobDetail(jobinfo.getJobName(), jobinfo.getGroupName(), jobinfo.getJob());
      job.setDescription(jobinfo.getDescription());
      scheduler_.scheduleJob(job, trigger);
   }
View Full Code Here

         start = new Date();
      if (repeat <= 0)
         repeat = SimpleTrigger.REPEAT_INDEFINITELY;
      else
         repeat = repeat - 1;
      SimpleTrigger trigger =
         new SimpleTrigger(jobinfo.getJobName(), jobinfo.getGroupName(), start, pinfo.getEndTime(), repeat, pinfo
            .getRepeatInterval());
      JobDetail job = new JobDetail(jobinfo.getJobName(), jobinfo.getGroupName(), jobinfo.getJob());
      job.setJobDataMap(jdatamap);
      job.setDescription(jobinfo.getDescription());
      scheduler_.scheduleJob(job, trigger);
View Full Code Here

        // create the trigger either cron or simple
        Trigger trigger;
        if (ObjectHelper.isNotEmpty(cron)) {
            trigger = createCronTrigger(cron);
        } else {
            trigger = new SimpleTrigger();
            if (fireNow) {
                String intervalString = (String) triggerParameters.get("repeatInterval");
                if (intervalString != null) {
                    long interval = Long.valueOf(intervalString);
                    trigger.setStartTime(new Date(System.currentTimeMillis() - interval));
View Full Code Here

TOP

Related Classes of org.quartz.SimpleTrigger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.