quartz.net 使用总结

简介: .net中使用第三方dll一定要注意版本问题:网上很多代码都是对的,你执行不了,有时候就是dll版本问题 粘个试过可用的供大家参考: app.config:                                                                           packages.config(可选。

.net中使用第三方dll一定要注意版本问题:网上很多代码都是对的,你执行不了,有时候就是dll版本问题

粘个试过可用的供大家参考:

app.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <sectionGroup name="common">
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
    </sectionGroup>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>

  <common>
    <logging>
      <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net1211">
        <arg key="configType" value="FILE-WATCH" />
        <arg key="configFile" value="~/systemconfig/log4net.xml" />
        <arg key="level" value="ALL" />
      </factoryAdapter>
    </logging>
  </common>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" /></startup>

</configuration>

packages.config(可选。项目大时会很有用):

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Common.Logging" version="2.1.2" targetFramework="net40" />
  <package id="Common.Logging.Log4Net1211" version="2.1.2" targetFramework="net40" />
  <package id="log4net" version="2.0.0" targetFramework="net40" />
  <package id="TopShelf" version="3.1.0" targetFramework="net40" />
</packages>

quartz.config

# You can configure your scheduler in either <quartz> configuration section
# or in quartz properties file
# Configuration section has precedence

quartz.scheduler.instanceName = SurferSMSScheduler

# configure thread pool info
quartz.threadPool.type = Quartz.Simpl.SimpleThreadPool, Quartz
quartz.threadPool.threadCount = 10
quartz.threadPool.threadPriority =Normal

# job initialization plugin handles our xml reading, without it defaults are used
quartz.plugin.xml.type = Quartz.Plugin.Xml.XMLSchedulingDataProcessorPlugin, Quartz
quartz.plugin.xml.fileNames = ~/systemconfig/quartz_jobs.xml

# job store
quartz.jobStore.misfireThreshold =60000
quartz.jobStore.type = Quartz.Simpl.RAMJobStore, Quartz

quartz_jobs.xml   log4net.xml这两个网上很多,基本都对。就不粘了

链接分享:

http://www.soaspx.com/dotnet/csharp/csharp_20110620_7737.html(这个要注意dll版本)

http://www.cnblogs.com/wucg/archive/2010/07/26/1784924.html(这个要注意dll版本)

http://blog.cfxixi.com/post/2012/11/05/%E8%A7%A3%E5%86%B3net-Mvc3-Unable-to-create-type-CommonLoggingLog4NetLog4NetLoggerFactoryAdapter-CommonLoggingLog4Net%E9%97%AE%E9%A2%98.aspx

http://stackoverflow.com/questions/11368267/failed-obtaining-configuration-for-common-logging-from-configuration-section-co(就是看这篇才解决问题)

 

http://www.zhaodll.com/

相关文章
|
7月前
|
人工智能 开发框架 Kubernetes
.NET Core入门必知
.NET Core入门必知
|
9月前
|
开发框架 数据可视化 Java
.NET6+Quartz实现定时任务
.NET6+Quartz实现定时任务
186 0
|
开发框架 .NET API
.net core入门
.net core概述
|
SQL 关系型数据库 MySQL
ABP使用.Net Core
ABP使用.Net Core
76 0
|
开发框架 前端开发 .NET
.NET Core 学习资料
.NET Core 学习资料
219 0
.NET Core 学习资料
|
调度 Windows 容器
Quartz.NET的使用(附源码)(二)
Quartz.NET的使用(附源码)(二)
277 0
|
存储 开发框架 NoSQL
ASP.NET Core+Quartz.Net实现web定时任务
此处我们的项目使用稍复杂的Quartz.net实现web定时任务。
ASP.NET Core+Quartz.Net实现web定时任务
|
机器学习/深度学习 物联网 编译器
|
C# 数据库
|
JSON API 数据格式
.NET Core 技巧汇总篇
前言 本篇幅会专门记录在工作中实际碰到的问题场景,和一些比较好的实现方法作为汇总,可以供各位借鉴和参考,当然 本人入行不深,能力有限,仅供各位借鉴和参考。欢迎补充   技巧一:引入其他项目类库文件 做项目大家都知道会有远程请求API的情况,现在假设做API的项目你能接触到并且Git下来。
1219 0