Results 1 to 2 of 2

Thread: How to implement timeout for a dynamically created job?

  1. #1

    Default How to implement timeout for a dynamically created job?

    Hi,

    I am working on job scheduling with Spring Batch 2.1.8 along quartz scheduler1.8

    I need to create jobs dynamically through UI by specifying the date/frequency of job/ jobtimeout.

    I am able to create the jobs dynamically but stuck at timeout implementation to these jobs.

    Could not find any articles/tutorials about implementing timeout to jobs which stops the job with appropriate statuses at job execution and step execution.

    Any guideline will be really helpful to me as I do need to deliver this in next 2/3 days.

    Thanks in advance.

  2. #2

    Default

    I did trying setting timout value as property at jobDataAsMap and adding timeout property at implementing class with setter method. But this is not working.

    <beans:bean name="MyQJob"
    class="org.springframework.scheduling.quartz.JobDe tailBean">
    <beansroperty name="jobClass" value="com.org.scheduler.quartz.MyQuartzJob" />
    <beansroperty name="jobDataAsMap">
    <beans:map>
    <beans:entry key="timeout" value="50000" />
    </beans:map>
    </beansroperty>
    </beans:bean>

    Any guideline will really help me to deliver this functionality.

    Thanks in advance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •