Announcement Announcement Module
Collapse
No announcement yet.
quartz + spring, how to cleanup for all jobs from scheduler on startup Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • quartz + spring, how to cleanup for all jobs from scheduler on startup

    Hi !
    I use quartz-1.6.6 and spring-2.0.2

    Could you advise any way to clear up all jobs from scheduler on startup?
    The reason for this action: quartz scheduler doesn't remove job from database, if it doesn't use more.
    Scheduler only can to overwrite existing jobs.
    My configuration:
    spring configuration
    <bean id="com.companyName.schedulerBean"
    class="org.springframework.scheduling.quartz.Sched ulerFactoryBean"
    p:waitForJobsToCompleteOnShutdown="true"
    p:overwriteExistingJobs="true">
    <property name="triggers">
    <bean
    class="com.expedia.e3.lty.batchprocess.batchservic e.impl.TriggersFactoryBean" />
    </property>
    <property name="quartzProperties">
    <props>
    ...
    <props>

    Here my quartz properties:

    #================================================= ===========================
    # Configure Main Scheduler Properties
    #================================================= ===========================

    org.quartz.scheduler/instanceName = ClusteredScheduler
    org.quartz.scheduler/instanceId = AUTO
    org.quartz.scheduler/threadsInheritContextClassLoaderOfInitializer=true
    #================================================= ===========================
    # Configure ThreadPool
    #================================================= ===========================

    org.quartz.threadPool/class = org.quartz.simpl.SimpleThreadPool
    org.quartz.threadPool/threadCount = 25
    org.quartz.threadPool/threadPriority = 5

    #================================================= ===========================
    # Configure JobStore
    #================================================= ===========================

    org.quartz.jobStore/misfireThreshold = 60000

    org.quartz.jobStore/class = org.quartz.impl.jdbcjobstore.JobStoreTX
    org.quartz.jobStore/driverDelegateClass =org.quartz.impl.jdbcjobstore.MSSQLDelegate
    org.quartz.jobStore/useProperties = true
    org.quartz.jobStore/dataSource=BatchDS
    org.quartz.jobStore/tablePrefix = QRTZ_
    org.quartz.jobStore/isClustered=true
    org.quartz.jobStore/clusterCheckinInterval = 20000
    org.quartz.jobStore/selectWithLockSQL=SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?
    org.quartz.jobStore.lockHandler/class=org.quartz.impl.jdbcjobstore.UpdateLockRowSe maphore
    org.quartz.jobStore/acquireTriggersWithinLock=true

    #================================================= ===========================
    # Configure Datasources
    #================================================= ===========================

    org.quartz.dataSource.BatchDS/driver = net.sourceforge.jtds.jdbc.Driver
    org.quartz.dataSource.BatchDS/maxConnections = 5
    org.quartz.dataSource.BatchDS/URL=MUST_OVERRIDE
    org.quartz.dataSource.BatchDS/user=MUST_OVERRIDE
    org.quartz.dataSource.BatchDS/password=MUST_OVERRIDE
    Last edited by Rossiell; Dec 9th, 2011, 02:28 AM.
Working...
X