Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
need a help on Scheduler Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • need a help on Scheduler

    Hi

    I was trying for scheduling a job.
    I have done the following...

    <bean name="testJob" class="org.springframework.scheduling.quartz.JobDe tailBean">
    <property name="jobClass" value="test.TestJob" />
    <property name="jobDataAsMap">
    <map>
    <entry key="timeout" value="5" />
    </map>
    </property>
    </bean>
    <bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronT riggerBean">
    <property name="jobDetail" ref="testJob" />
    <!-- run every morning at 6 AM -->
    <property name="cronExpression" value="0 0 6 * * ?" />
    </bean>

    <bean class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
    <property name="triggers">
    <list>
    <ref bean="cronTrigger" />
    </list>
    </property>
    </bean>

    package test;

    public class TestJob extends QuartzJobBean {

    private int timeout;

    /**
    * Setter called after the ExampleJob is instantiated
    * with the value from the JobDetailBean (5)
    */
    public void setTimeout(int timeout) {
    this.timeout = timeout;
    }

    protected void executeInternal(JobExecutionContext ctx) throws JobExecutionException {
    System.out.println(new Date());
    }
    }


    But my job is not starting........ can anyone help on this?
    even i changed this according to my system time...(This following shows everyday 6am)
    <property name="cronExpression" value="0 0 6 * * ?" />

    Thanks and advance...
Working...
X