Package org.quartz.DateBuilder

Examples of org.quartz.DateBuilder.IntervalUnit


                String repeatIntervalString = getTrimmedToNullString(xpath, "q:repeat-interval", triggerNode);
                String repeatUnitString = getTrimmedToNullString(xpath, "q:repeat-interval-unit", triggerNode);

                int repeatInterval = Integer.parseInt(repeatIntervalString);

                IntervalUnit repeatUnit = IntervalUnit.valueOf(repeatUnitString);

                sched = calendarIntervalSchedule()
                    .withInterval(repeatInterval, repeatUnit);

                if (triggerMisfireInstructionConst != null && triggerMisfireInstructionConst.length() != 0) {
View Full Code Here


        int interval = props.getInt1();
        String intervalUnitStr = props.getString1();
        String daysOfWeekStr = props.getString2();
        String timeOfDayStr = props.getString3();

        IntervalUnit intervalUnit = IntervalUnit.valueOf(intervalUnitStr);
        DailyTimeIntervalScheduleBuilder scheduleBuilder = DailyTimeIntervalScheduleBuilder
                .dailyTimeIntervalSchedule()
                .withInterval(interval, intervalUnit)
                .withRepeatCount(repeatCount);
               
View Full Code Here

        long fireMillis = fireTime.getTime();
        long startMillis = fireTimeStartDate.getTime();
        long secondsAfterStart = (fireMillis - startMillis) / 1000L;
        long repeatLong = getRepeatInterval();
        Calendar sTime = createCalendarTime(fireTimeStartDate);
        IntervalUnit repeatUnit = getRepeatIntervalUnit();
        if(repeatUnit.equals(IntervalUnit.SECOND)) {
            long jumpCount = secondsAfterStart / repeatLong;
            if(secondsAfterStart % repeatLong != 0)
                jumpCount++;
            sTime.add(Calendar.SECOND, getRepeatInterval() * (int)jumpCount);
            fireTime = sTime.getTime();
        } else if(repeatUnit.equals(IntervalUnit.MINUTE)) {
            long jumpCount = secondsAfterStart / (repeatLong * 60L);
            if(secondsAfterStart % (repeatLong * 60L) != 0)
                jumpCount++;
            sTime.add(Calendar.MINUTE, getRepeatInterval() * (int)jumpCount);
            fireTime = sTime.getTime();
        } else if(repeatUnit.equals(IntervalUnit.HOUR)) {
            long jumpCount = secondsAfterStart / (repeatLong * 60L * 60L);
            if(secondsAfterStart % (repeatLong * 60L * 60L) != 0)
                jumpCount++;
            sTime.add(Calendar.HOUR_OF_DAY, getRepeatInterval() * (int)jumpCount);
            fireTime = sTime.getTime();
View Full Code Here

TOP

Related Classes of org.quartz.DateBuilder.IntervalUnit

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.