if (hourlyString != null && hourlyString.trim().length() > 0) {
String[] hourlyTasks = StringUtils.stripAll(
StringUtils.split(hourlyString, ",") );
for (int i=0; i<hourlyTasks.length; i++) {
mLogger.info("Setting hourly task: "+hourlyTasks[i]);
ScheduledTask task =
(ScheduledTask)Class.forName(hourlyTasks[i]).newInstance();
task.init(roller, mContext.getRealPath("/"));
roller.getThreadManager().scheduleHourlyTimerTask((TimerTask)task);
}
}
// setup the daily tasks
String dailyString = RollerConfig.getProperty("tasks.daily");
if (dailyString != null && dailyString.trim().length() > 0) {
String[] dailyTasks = StringUtils.stripAll(
StringUtils.split(dailyString, ",") );
for (int j=0; j<dailyTasks.length; j++) {
mLogger.info("Setting daily task: "+dailyTasks[j]);
ScheduledTask task =
(ScheduledTask)Class.forName(dailyTasks[j]).newInstance();
task.init(roller, mContext.getRealPath("/"));
roller.getThreadManager().scheduleDailyTimerTask((TimerTask)task);
}
}
}