[opencms-dev] ScheduledJob is gone after Tomcat restart

Felix Glade-Beucke felix.glade-beucke at componio.net
Thu Feb 17 14:44:47 CET 2011


Hi there,

I have a class to create a scheduled job. Its created normally but after a restart of my tomcat server, the job is gone.

CmsScheduleManager csm = OpenCms.getScheduleManager();
CmsScheduledJobInfo csji = new CmsScheduledJobInfo();

csji.setCronExpression("* 30 4 * * ?");
csji.setClassName("my.module.class.ClassName");
csji.setActive(true);
csji.setReuseInstance(false);
csji.setJobName("This is my Job");

// (this.cmsObject is an given CmsObject from within an ActionClass)
csji.setContextInfo(new CmsContextInfo(this.cmsObject.getRequestContext()));

SortedMap parameters = new TreeMap();
parameters.put("resourceTypId", this.cmsRes.getTypeId());
parameters.put("resourcePath", this.resourcePath);
csji.setParameters(parameters)

csm.scheduleJob(this.cmsObject, csji);


The Job works fine till my Tomcat restart :-(

Any ideas?

Thanks to all,

Felix






More information about the opencms-dev mailing list