Sets the schedule properties of a cache group for a package.
void setCacheGroupSchedule(String cacheGroupName, CacheGroupScheduleVO cacheGroupSchedule) throws SUPAdminException;
If successful, returns silently. If unsuccessful, returns SUPAdminException.
CacheGroupScheduleVO cgsvo = new CacheGroupScheduleVO(); cgsvo.setFrequency(SCHEDULE_FREQ.DAILY); EnumSet<DAY_OF_WEEK> daysOfWeek = EnumSet.noneOf(DAY_OF_WEEK.class); daysOfWeek.add(DAY_OF_WEEK.MONDAY); daysOfWeek.add(DAY_OF_WEEK.THURSDAY); cgsvo.setDayOfWeek(daysOfWeek); //start date: 2009-12-03 //start time: 18:31:45 //end date: 2009-12-23 //end time: 21:34:47 Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, 2009); cal.set(Calendar.MONTH, 11); cal.set(Calendar.DAY_OF_MONTH, 3); Date startDate = cal.getTime(); cgsvo.setStartDate(startDate); cal.set(Calendar.YEAR, 2009); cal.set(Calendar.MONTH, 11); cal.set(Calendar.DAY_OF_MONTH, 23); Date endDate = cal.getTime(); cgsvo.setEndDate(endDate); cal.set(Calendar.HOUR_OF_DAY, 18); cal.set(Calendar.MINUTE, 31); cal.set(Calendar.SECOND, 45); Date startTime = cal.getTime(); cgsvo.setStartTime(startTime); cal.set(Calendar.HOUR_OF_DAY, 21); cal.set(Calendar.MINUTE, 34); cal.set(Calendar.SECOND, 47); Date endTime = cal.getTime(); cgsvo.setEndTime(endTime); suppkg.setCacheGroupSchedule("<cache group name>", cgsvo);
CacheGroupScheduleVO cgsvo = new CacheGroupScheduleVO(); cgsvo.setFrequency(SCHEDULE_FREQ.INTERVAL); cgsvo.setInterval(CacheGroupScheduleVO.NEVER_EXPIRE); suppkg.setCacheGroupSchedule("<cache group name>", cgsvo);