Package org.quartz

Examples of org.quartz.SimpleTrigger


            ctrigger.setCronExpression(cronExpression);
            trigger = ctrigger;
        }
        else if (repeatInterval != null)
        {
            SimpleTrigger strigger = new SimpleTrigger();
            strigger.setRepeatInterval(Long.parseLong(repeatInterval));
            if (repeatCount != null)
            {
                strigger.setRepeatCount(Integer.parseInt(repeatCount));
            }
            else
            {
                strigger.setRepeatCount(-1);
            }
            trigger = strigger;
        }
        else
        {
View Full Code Here


    throws CascadingException {
        final JobDataMap jobDataMap = new JobDataMap();
        jobDataMap.put(DATA_MAP_ROLE, jobrole);

        final long ms = period * 1000;
        final SimpleTrigger timeEntry =
            new SimpleTrigger(name, DEFAULT_QUARTZ_JOB_GROUP, new Date(System.currentTimeMillis() + ms), null,
                              SimpleTrigger.REPEAT_INDEFINITELY, ms);

        addJob(name, jobDataMap, timeEntry, canRunConcurrently, params, objects);
    }
View Full Code Here

        }
        final JobDataMap jobDataMap = new JobDataMap();
        jobDataMap.put(DATA_MAP_OBJECT, job);
       
        final long ms = period * 1000;
        final SimpleTrigger timeEntry =
            new SimpleTrigger(name, DEFAULT_QUARTZ_JOB_GROUP, new Date(System.currentTimeMillis() + ms), null,
                              SimpleTrigger.REPEAT_INDEFINITELY, ms);
       
        addJob(name, jobDataMap, timeEntry, canRunConcurrently, params, objects);
    }
View Full Code Here

     * @throws CascadingException thrown in case of errors
     */
    private void addJob(final String name, final JobDataMap jobDataMap, final Date date,
                        final boolean canRunConcurrently, final Parameters params, final Map objects)
    throws CascadingException {
        final SimpleTrigger trigger = new SimpleTrigger(name, DEFAULT_QUARTZ_JOB_GROUP, date);
        addJob(name, jobDataMap, trigger, canRunConcurrently, params, objects);
    }
View Full Code Here

            log.debug("Scheduling session validation job using Quartz with " +
                    "session validation interval of [" + sessionValidationInterval + "]ms...");
        }

        try {
            SimpleTrigger trigger = new SimpleTrigger(getClass().getName(),
                    Scheduler.DEFAULT_GROUP,
                    SimpleTrigger.REPEAT_INDEFINITELY,
                    sessionValidationInterval);

            JobDetail detail = new JobDetail(JOB_NAME, Scheduler.DEFAULT_GROUP, QuartzSessionValidationJob.class);
View Full Code Here

        JobDataMap jdm = new JobDataMap(mcopy);
        jobDetail.setJobDataMap(jdm);
        jobDetail.setDurability(false);
        jobDetail.setVolatility(volatil);
        jobDetail.setRequestsRecovery(true);
        Trigger trigger = new SimpleTrigger(jobDetail.getName() + ".trigger", org.quartz.Scheduler.DEFAULT_GROUP, when, null, 0, 0L);
        trigger.setVolatility(volatil);

        try {
            _quartz.scheduleJob(jobDetail, trigger);
        } catch (SchedulerException e) {
            String errmsg = "Quartz failure in schedulePersistentJob";
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

            public void configure() throws Exception {
                QuartzEndpoint endpoint = new QuartzEndpoint();
                endpoint.setCamelContext(context);
                endpoint.setScheduler(scheduler);

                SimpleTrigger trigger = new SimpleTrigger();
                trigger.setGroup("myGroup");
                trigger.setName("myTimerName");
                trigger.setRepeatCount(1);
                trigger.setRepeatInterval(2);

                endpoint.setTrigger(trigger);

                context.addEndpoint("qtx", endpoint);
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

    scheduler.getContext();
    schedulerControl.setReturnValue(new SchedulerContext());
    scheduler.getTrigger("myTrigger0", Scheduler.DEFAULT_GROUP);
    schedulerControl.setReturnValue(null);
    scheduler.getTrigger("myTrigger1", Scheduler.DEFAULT_GROUP);
    schedulerControl.setReturnValue(new SimpleTrigger());
    if (overwrite) {
      scheduler.addJob(jobDetail1, true);
      schedulerControl.setVoidCallable();
      scheduler.rescheduleJob("myTrigger1", Scheduler.DEFAULT_GROUP, trigger1);
      schedulerControl.setReturnValue(new Date());
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.