[opencms-dev] List the scheduled jobs

Celio Faria Jr celiofariajr at gmail.com
Mon Dec 17 21:35:46 CET 2007


Hi all,

I´m using OpenCms 7.0.3, Tomcat 5.5.25 and JDK 1.5, and I want to do a very
simple list of scheduled jobs, but... OpenCms lists no one, even if there
are two of them at the Administration view list!

The code I am using is as follows:

<%@page import="org.opencms.main.CmsContextInfo,
                        org.opencms.scheduler.CmsScheduledJobInfo,
                        org.opencms.scheduler.CmsScheduleManager,
                        org.opencms.file.CmsObject,
                        org.opencms.jsp.CmsJspBean,
            java.util.*"%>
<HTML><BODY>
<%
    CmsJspBean cjb = new CmsJspBean();

    cjb.init(pageContext,request,response);

    CmsObject cmsObj = cjb.getCmsObject();

    CmsScheduleManager csm = new CmsScheduleManager();
        csm.initialize(cmsObj);%>
    There are <%=csm.getJobs().size()%> scheduled jobs.<BR>

    <ul>

    <% for (Object object : csm.getJobs()) {
        CmsScheduledJobInfo jobInfo = (CmsScheduledJobInfo)object; %>
        <li><%=jobInfo.getId()%> - <%=jobInfo.getJobName()%>

    <%}%>
    </ul>
</BODY></HTML>

Anyone got this problem? Any clues?


TIA,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20071217/e78da021/attachment.html>


More information about the opencms-dev mailing list