@Schedule(hour = "*", minute = "*", second = "*/5", info = "Every 5 second timer") public void fastAutomaticallyScheduled(Timer timer) { fireEvent(timer); }
= new CronExpression(schedule.second(), schedule.minute(), schedule.hour(), schedule.dayOfWeek(), schedule.dayOfMonth(), schedule.month(), schedule.year()); if (! schedule.timezone().trim().equals("")) { timezone = TimeZone.getTimeZone(schedule.timezone()); cronExpression, trigger, schedule.info());
sd.setSecond(sch.second()); sd.setMinute(sch.minute()); sd.setHour(sch.hour()); sd.setDayOfMonth(sch.dayOfMonth()); sd.setMonth(sch.month()); sd.setDayOfWeek(sch.dayOfWeek()); sd.setYear(sch.year()); sd.setTimezone(sch.timezone()); sd.setPersistent(sch.persistent()); sd.setInfo(sch.info()); sd.setTimeoutMethod(new MethodDescriptor(annMethod));
@Schedule(hour = "*", minute = "*", second = "*/10", info = "Every 10 second timer") public void slowlyAutomaticallyScheduled(Timer timer) { fireEvent(timer); }
timer.setPersistent(schedule.persistent()); timer.setInfo(schedule.info() == null || schedule.info().isEmpty() ? null : schedule.info()); timer.setTimezone(schedule.timezone() == null || schedule.timezone().isEmpty() ? null : schedule.timezone()); timerSchedule.setSecond(schedule.second()); timerSchedule.setMinute(schedule.minute()); timerSchedule.setHour(schedule.hour()); timerSchedule.setDayOfWeek(schedule.dayOfWeek()); timerSchedule.setDayOfMonth(schedule.dayOfMonth()); timerSchedule.setMonth(schedule.month()); timerSchedule.setYear(schedule.year()); timer.setSchedule(timerSchedule);
@Schedule(hour = "*", minute = "0", second = "0", persistent = false) public void myJob() { executedBatchs.add(BatchRuntime.getJobOperator().start("myJob", new Properties())); afterRun(); }
timer.setPersistent(schedule.persistent()); timer.setInfo(schedule.info() == null || schedule.info().isEmpty() ? null : schedule.info()); timer.setTimezone(schedule.timezone() == null || schedule.timezone().isEmpty() ? null : schedule.timezone()); timerSchedule.setSecond(schedule.second()); timerSchedule.setMinute(schedule.minute()); timerSchedule.setHour(schedule.hour()); timerSchedule.setDayOfWeek(schedule.dayOfWeek()); timerSchedule.setDayOfMonth(schedule.dayOfMonth()); timerSchedule.setMonth(schedule.month()); timerSchedule.setYear(schedule.year()); timer.setSchedule(timerSchedule);
@Schedule(hour = "*", minute = "*", second = "*/5", info = "Every 5 second timer") public void printDate() { Collection<Timer> timers = ctx.getTimerService().getAllTimers(); for (Timer t : timers) { pingEvent.fire(new Ping(t.getInfo().toString())); } }
sd.setSecond(sch.second()); sd.setMinute(sch.minute()); sd.setHour(sch.hour()); sd.setDayOfMonth(sch.dayOfMonth()); sd.setMonth(sch.month()); sd.setDayOfWeek(sch.dayOfWeek()); sd.setYear(sch.year()); sd.setTimezone(sch.timezone()); sd.setPersistent(sch.persistent()); sd.setInfo(sch.info()); sd.setTimeoutMethod(new MethodDescriptor(annMethod));
@Schedule(minute = "*/10", hour = "*", persistent = false) public void refreshCache() { // ... } }
for (javax.ejb.Schedule schedule : list) { Schedule s = new Schedule(); s.setSecond(schedule.second()); s.setMinute(schedule.minute()); s.setHour(schedule.hour()); s.setDayOfWeek(schedule.dayOfWeek()); s.setDayOfMonth(schedule.dayOfMonth()); s.setMonth(schedule.month()); s.setYear(schedule.year()); s.setPersistent(schedule.persistent()); s.setInfo(schedule.info()); methodSchedule.getSchedule().add(s);
@Schedule(hour = "*", minute = "*/20", persistent = false) public void forceReloadingOfLists() { reloadDeployableRoleList = true; reloadRolesAndPermissionsList = true; reloadUserRestrictionsList = true; }
@Schedule(dayOfMonth = "1", hour = "5", minute = "30") public void statisticsItemsSold() { // ... }
@Schedule(hour = "*", minute = "*", second = "*/5", info = "Every 5 second timer", timezone = "UTC") public void printSchedule() { logger.info("SimpleTimerBean Schedule Fired .... "); }
@Schedule(second="*/1", minute="*",hour="*", persistent=false) public void schedule(){ LOG.info("invoke schedule method {}", new Date()); }
@Schedule(minute = "*/1", persistent = false) public void cleanupWatchers() { ResourceWatcherManager.logger.info("Cleaning up resource watchers..."); for (Iterator<Future<Void>> it = this.watchers.iterator(); it.hasNext();) { Future<Void> watcher = it.next(); if (watcher.isDone()) { it.remove(); } } ResourceWatcherManager.logger.info(this.watchers.size() + " resource watchers in progress"); }
@Schedule(hour = "*", minute = "*", second = "*/5", info = "Every 5 second timer", timezone = "UTC", persistent = false) public void myTimer() { try (Connection conn = factory.createConnection()){ Session sess = conn.createSession(true,Session.AUTO_ACKNOWLEDGE); sess.createProducer(queue).send(sess.createTextMessage("This is a test at " + new Date())); } catch (JMSException ex) { Logger.getLogger(SendJMSMessage.class.getName()).log(Level.SEVERE, null, ex); } }
/** * Job that triggers a delete of outdated metric information from the Server. * * Note: Occurring every day at midnight in the default time zone associated with the container * in which the application is executing. These are the default values from the @Schedule annotation. */ @Schedule public void deleteOutdatedFlatMetrics(){ logger.trace("scheduled deletion for outdated push info data"); service.deleteOutdatedFlatPushInformationData(); } }
@Schedule(hour = "*", minute="*", second = "*/1", persistent = false) public void generatePrice() { String symbol = "PAYARA"; Stock stock = new Stock(symbol,"",(Math.random()*100.0) + 10.0); System.out.println(stock); stockEvents.fire(stock); }