Package org.apache.roller.model

Examples of org.apache.roller.model.ScheduledTask


        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);
            }
        }
    }
View Full Code Here


        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);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.roller.model.ScheduledTask

Copyright © 2018 www.massapicom. 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.