Package javax.ejb

Examples of javax.ejb.ScheduleExpression.hour()


    @Override
    public void initialize(String info) {
        ScheduleExpression sexpr = new ScheduleExpression();
        // set schedule to every 10 seconds for demonstration
        sexpr.hour("*").minute("*").second("0/10");
        // persistent must be false because the timer is started by the HASingleton service
        timerService.createCalendarTimer(sexpr, new TimerConfig(info, false));
    }

    @Override
View Full Code Here


                for (ScheduleInfo scheduleInfo : info.schedules) {

                    ScheduleExpression expr = new ScheduleExpression();
                    expr.second(scheduleInfo.second);
                    expr.minute(scheduleInfo.minute);
                    expr.hour(scheduleInfo.hour);
                    expr.dayOfWeek(scheduleInfo.dayOfWeek);
                    expr.dayOfMonth(scheduleInfo.dayOfMonth);
                    expr.month(scheduleInfo.month);
                    expr.year(scheduleInfo.year);
View Full Code Here

            final ScheduleExpression se = new ScheduleExpression();
            final Calendar calendar = Calendar.getInstance();
            calendar.add(Calendar.SECOND, 2);
            se.second(calendar.get(Calendar.SECOND) + "/3");
            se.minute("*");
            se.hour("*");
            se.dayOfMonth("*");
            se.dayOfWeek("*");
            se.month("*");
            timer = timerService.createCalendarTimer(se, tc);
        }
View Full Code Here

            final ScheduleExpression se = new ScheduleExpression();
            final Calendar calendar = Calendar.getInstance();
            calendar.add(Calendar.SECOND, 2);
            se.second(calendar.get(Calendar.SECOND) + "/3");
            se.minute("*");
            se.hour("*");
            se.dayOfMonth("*");
            se.dayOfWeek("*");
            se.month("*");
            timer = timerService.createCalendarTimer(se, tc);
        }
View Full Code Here

            final ScheduleExpression se = new ScheduleExpression();
            final Calendar calendar = Calendar.getInstance();
            calendar.add(Calendar.SECOND, 2);
            se.second(calendar.get(Calendar.SECOND) + "/3");
            se.minute("*");
            se.hour("*");
            se.dayOfMonth("*");
            se.dayOfWeek("*");
            se.month("*");
            timer = timerService.createCalendarTimer(se, tc);
        }
View Full Code Here

                    final ScheduleExpression scheduleExpression = autoTimer.getScheduleExpression();
                    final ScheduleMetaData schedule = timer.getSchedule();
                    if (schedule != null) {
                        scheduleExpression.dayOfMonth(schedule.getDayOfMonth());
                        scheduleExpression.dayOfWeek(schedule.getDayOfWeek());
                        scheduleExpression.hour(schedule.getHour());
                        scheduleExpression.minute(schedule.getMinute());
                        scheduleExpression.month(schedule.getMonth());
                        scheduleExpression.second(schedule.getSecond());
                        scheduleExpression.year(schedule.getYear());
                    }
View Full Code Here

   {
      // clone the schedule
      ScheduleExpression clonedSchedule = new ScheduleExpression();
      clonedSchedule.second(schedule.getSecond());
      clonedSchedule.minute(schedule.getMinute());
      clonedSchedule.hour(schedule.getHour());
      clonedSchedule.dayOfWeek(schedule.getDayOfWeek());
      clonedSchedule.dayOfMonth(schedule.getDayOfMonth());
      clonedSchedule.month(schedule.getMonth());
      clonedSchedule.year(schedule.getYear());
      clonedSchedule.timezone(schedule.getTimezone());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.