本文整理了Java中org.quartz.Scheduler.addCalendar()
方法的一些代码示例,展示了Scheduler.addCalendar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scheduler.addCalendar()
方法的具体详情如下:
包路径:org.quartz.Scheduler
类名称:Scheduler
方法名:addCalendar
[英]Add (register) the given Calendar
to the Scheduler.
[中]向调度程序添加(注册)给定的Calendar
。
代码示例来源:origin: spring-projects/spring-framework
for (String calendarName : this.calendars.keySet()) {
Calendar calendar = this.calendars.get(calendarName);
getScheduler().addCalendar(calendarName, calendar, true, true);
代码示例来源:origin: org.springframework/spring-context-support
for (String calendarName : this.calendars.keySet()) {
Calendar calendar = this.calendars.get(calendarName);
getScheduler().addCalendar(calendarName, calendar, true, true);
代码示例来源:origin: org.rhq/rhq-enterprise-server
public void addCalendar(String calName, Calendar calendar, boolean replace, boolean updateTriggers)
throws SchedulerException {
scheduler.addCalendar(calName, calendar, replace, updateTriggers);
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
public void addCalendar(String calName, Calendar calendar, boolean replace, boolean updateTriggers)
throws SchedulerException {
this.scheduler.addCalendar(calName, calendar, replace, updateTriggers);
}
代码示例来源:origin: myschedule/myschedule-quartz-extra
public void addCalendar(String calName, Calendar calendar, boolean replace, boolean updateTriggers) {
try {
scheduler.addCalendar(calName, calendar, replace, updateTriggers);
} catch (SchedulerException e) {
throw new QuartzRuntimeException(e);
}
}
代码示例来源:origin: org.codelibs/elasticsearch-quartz
public void addCalendar(final String calName, final Calendar calendar,
final boolean replace, final boolean updateTriggers) {
try {
scheduler.addCalendar(calName, calendar, replace, updateTriggers);
} catch (final SchedulerException e) {
throw new QuartzSchedulerException(e);
}
}
代码示例来源:origin: OpenWiseSolutions/openhub-framework
@Override
public void addCalendar(String calName, Calendar calendar, boolean replace, boolean updateTriggers) throws SchedulerException {
getScheduler().addCalendar(calName, calendar, replace, updateTriggers);
}
代码示例来源:origin: snakerflow/snakerflow
private Scheduler getScheduler() {
try {
Scheduler scheduler = schedulerFactory.getScheduler();
String useCalendarStr = ConfigHelper.getProperty(CONFIG_USECALENDAR);
boolean isUse = Boolean.parseBoolean(useCalendarStr);
if(isUse) {
BaseCalendar cal = null;
try {
cal = build();
} catch(Exception e) {
log.error("构造BaseCalendar失败->" + e.getMessage());
}
if(cal != null) {
scheduler.addCalendar(CALENDAR_NAME, cal, false, false);
isUseCalendar = true;
}
}
scheduler.start();
return scheduler;
} catch (SchedulerException e) {
throw new SnakerException(e);
}
}
代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz
/**
* Adds a calendar.
*
* @param calendarBundle calendar bundle.
* @throws SchedulerException if the Calendar cannot be added to the Scheduler, or
* there is an internal Scheduler error.
*/
public void addCalendar(Scheduler sched, CalendarBundle calendarBundle) throws SchedulerException {
sched.addCalendar(
calendarBundle.getCalendarName(),
calendarBundle.getCalendar(),
calendarBundle.getReplace(),
true);
}
代码示例来源:origin: com.threewks.thundr/thundr-contrib-quartz
@Override
public void addCalendar(String calName, Calendar calendar, boolean replace, boolean updateTriggers) throws QuartzException {
try {
delegate.addCalendar(calName, calendar, replace, updateTriggers);
} catch (SchedulerException e) {
Logger.error(e.getMessage());
throw new QuartzException(e);
}
}
代码示例来源:origin: org.apache.camel/camel-quartz2
@Override
protected void doStart() throws Exception {
if (isDeleteJob() && isPauseJob()) {
throw new IllegalArgumentException("Cannot have both options deleteJob and pauseJob enabled");
}
if (ObjectHelper.isNotEmpty(customCalendar)) {
getComponent().getScheduler().addCalendar(QuartzConstants.QUARTZ_CAMEL_CUSTOM_CALENDAR, customCalendar, true, false);
}
addJobInScheduler();
}
代码示例来源:origin: com.threewks.thundr/thundr-quartz
@Override
public void addCalendar(String calName, Calendar calendar, boolean replace, boolean updateTriggers) throws QuartzException {
try {
delegate.addCalendar(calName, calendar, replace, updateTriggers);
} catch (SchedulerException e) {
Logger.error(e.getMessage());
throw new QuartzException(e);
}
}
代码示例来源:origin: quartz/quartz-all
/**
* Adds a calendar.
*
* @param calendarBundle calendar bundle.
* @throws SchedulerException if the Calendar cannot be added to the Scheduler, or
* there is an internal Scheduler error.
*/
public void addCalendar(Scheduler sched, CalendarBundle calendarBundle) throws SchedulerException {
sched.addCalendar(
calendarBundle.getCalendarName(),
calendarBundle.getCalendar(),
calendarBundle.getReplace(),
true);
}
代码示例来源:origin: pentaho/pentaho-platform
scheduler.addJob( jobDetail, true );
if ( triggerCalendar != null ) {
scheduler.addCalendar( jobId.toString(), triggerCalendar, true, true );
quartzTrigger.setCalendarName( jobId.toString() );
代码示例来源:origin: org.opensingular/singular-schedule
getScheduler().addCalendar(calendar.getKey(), calendar.getValue(), true, true);
代码示例来源:origin: org.opensingular/singular-flow-schedule
getScheduler().addCalendar(calendar.getKey(), calendar.getValue(), true, true);
代码示例来源:origin: org.opensingular/flow-schedule
getScheduler().addCalendar(calendar.getKey(), calendar.getValue(), true, true);
代码示例来源:origin: dqeasycloud/easy-cloud
private Trigger buildCalendar(final EcTaskSchedulerDTO taskSchedulerDTO, final Trigger trigger) throws SchedulerException {
logger.info("holidayName:" + taskSchedulerDTO.getHolidayName());
logger.info("holidays:" + taskSchedulerDTO.getHolidayDTOs());
if (taskSchedulerDTO.getHolidayName() != null && EcCollectionsUtils.isNotEmpty(taskSchedulerDTO.getHolidayDTOs())) {
AnnualCalendar holidays = new AnnualCalendar();
for (EcHolidayDTO holidayDTO : taskSchedulerDTO.getHolidayDTOs()) {
Calendar calendar = new GregorianCalendar(holidayDTO.getYear(), holidayDTO.getMonth() - 1, holidayDTO.getDay());
holidays.setDayExcluded(calendar, true);
}
scheduler.addCalendar(taskSchedulerDTO.getHolidayName(), holidays, true, true);
return trigger.getTriggerBuilder().modifiedByCalendar(taskSchedulerDTO.getHolidayName()).build();
} else {
return trigger.getTriggerBuilder().modifiedByCalendar(null).build();
}
// return trigger;
}
代码示例来源:origin: youseries/uflo
if(calendar!=null){
String calendarName=REMINDER_CALENDAR_PREFIX+reminder.getId();
scheduler.addCalendar(calendarName, calendar,false, false);
trigger.setCalendarName(calendarName);
代码示例来源:origin: com.bstek.uflo/uflo-core
if(calendar!=null){
String calendarName=REMINDER_CALENDAR_PREFIX+reminder.getId();
scheduler.addCalendar(calendarName, calendar,false, false);
trigger.setCalendarName(calendarName);
内容来源于网络,如有侵权,请联系作者删除!