Primefaces Schedule在给定时间段的每个星期添加一个事件



我正在为我们学校的实验室办公室建立一个在线时间表。我可以访问学校的数据库,其中存储了给定课程的日期和时间段(例如:化学101-星期一-10:00至13:00)。

所以我需要加载事件包含名字,天,时间的一个类(Chemestry 101 -周一十点到13:00)每周在当前学术的时期,然后显示在时间表,只有我能想到的方法是通过计算当前学术的第一个星期一的日期期间,将事件添加到调度组件,然后计算下星期一的日期,并将事件添加到计划组件到学术期结束后,但这似乎很麻烦,也没有必要。这是我的问题

我是否可以告诉primefaces加载一个类(例如:"化学1010-星期一-10:00至13:00"),在每周的同一天,在一定的时间内(学术期间),没有在我的managedBean上创建一个循环来计算每个类的单独日期??

我使用的是Primefaces 3.5和STS (spring tool suite 3.4.0)

你为什么不试试scheduler job,

    write a program which do the stuff with  current date
suppose current date is 9 jun2 2014 which is Monday
    in window machine schedule a tast to run that program on every Monday with time,
    in linux create a crone job to run that program on every Monday with time,
    if you want to do this stuff OS independent that
    study Play Framework which will take care of schedule task and run the job on every Monday
    below the reference of Play

在这里输入链接描述http://www.playframework.com/documentation/1.1/jobs

最新更新