【问题标题】:Spring boot + Quartz + Oracle job schedulingSpring boot + Quartz + Oracle 作业调度
【发布时间】:2017-10-16 15:12:24
【问题描述】:

我想使用 Quartz 和 Oracle 作为 JobStore 来安排作业。我看到大多数使用 RAMjobstore 的示例(当然不是持久的),但几乎没有任何可以帮助我满足 Spring boot + Quartz + Oracle 开发的要求。

非常感谢任何代码示例或 github 项目的链接或帮助。

【问题讨论】:

    标签: oracle spring-boot cron quartz-scheduler job-scheduling


    【解决方案1】:

    好吧,我终于可以制作一个适合我要求的小型 Spring boot + Quartz + Oracle JobStore 应用程序了!而且我认为将链接分享给正在寻找相同内容的其他人可能会有所帮助。

    我会建议以下链接,使用这些链接您至少可以想出一个简单的解决方案:

    1. http://www.quartz-scheduler.org/documentation/quartz-2.x/quick-start.html
    2. https://github.com/davidkiss/spring-boot-quartz-demo

    对于持久性 Jobstore(特别是 Oracle),请在 quartz.properties 配置文件中使用以下属性:

    org.quartz.scheduler.instanceName=spring-boot-quartz-demo
    org.quartz.scheduler.instanceId=AUTO
    
    #============================================================================
    # Configure ThreadPool
    #============================================================================
    
    org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
    org.quartz.threadPool.makeThreadsDaemons = true
    org.quartz.threadPool.threadCount: 20
    org.quartz.threadPool.threadPriority: 5
    
    #============================================================================
    # Configure JobStore
    #============================================================================
    org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
    org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
    org.quartz.jobStore.useProperties=true
    org.quartz.jobStore.misfireThreshold=25000
    org.quartz.jobStore.tablePrefix=QRTZ_
    org.quartz.jobStore.isClustered=false 
    org.quartz.jobStore.dataSource = myDS
    
    #============================================================================
    # Configure Datasources  
    #============================================================================
    
    org.quartz.dataSource.myDS.driver = oracle.jdbc.pool.OracleDataSource
    org.quartz.dataSource.myDS.URL = jdbc:oracle:thin:xxxxxxxx
    org.quartz.dataSource.myDS.user = username
    org.quartz.dataSource.myDS.password = password
    org.quartz.dataSource.myDS.maxConnections = 5
    

    其余的应该很容易!干杯!

    【讨论】:

      猜你喜欢
      • 2015-05-11
      • 2012-11-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多