* @param logger
* @throws PageException
*/
protected void setScheduler(CFMLEngine engine,Resource scheduleDirectory, LogAndSource logger) throws PageException {
if(scheduleDirectory==null) {
if(this.scheduler==null) this.scheduler=new SchedulerImpl(engine,"<?xml version=\"1.0\"?>\n<schedule></schedule>",this,logger);
return;
}
if(!isDirectory(scheduleDirectory)) throw new ExpressionException("schedule task directory "+scheduleDirectory+" doesn't exist or is not a directory");
try {
if(this.scheduler==null)
this.scheduler=new SchedulerImpl(engine,this,scheduleDirectory,logger,SystemUtil.getCharset().name());
//else
//this.scheduler.reinit(scheduleDirectory,logger);
}
catch (Exception e) {
throw Caster.toPageException(e);