Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Some job schedules are static and can just be scheduled at start up time. Here is a simple way to do this.

public class MyJobScheduler {

      private Log log;

      private String cron = "0/1 * * * * ?";

      private QuartzTriggerHandle handle;

      public void setCron(String cron) {
            this.cron = cron;

      public void schedule() throws Exception {
            handle = MyJob.instance().execute(cron);
		log.debug("Scheduled Job: #0 with: #1", handle.getTrigger().getName(),

      public void unschedule() throws Exception {
            log.debug("Unscheduling Job: #0", handle.getTrigger().getName());

      public static class MyJob {

            private Log log;

            public QuartzTriggerHandle execute(@IntervalCron String cron) {
        "Doing somthing...");
                  return null;

            public static Job instance() {
                  return (Job) Component.getInstance(MyJob.class);