zoukankan      html  css  js  c++  java
  • CrystalQuartz实现Quartz的window服务的远程管理

    1、 建一个空的ASP.NET WebSite,利用NuGet安装CrystalQuartz.Remote 包

    我们可以看到,配置文件中多了如下节点:

    <crystalQuartz>
        <provider>
          <add property="Type" value="CrystalQuartz.Core.SchedulerProviders.RemoteSchedulerProvider, CrystalQuartz.Core" />
          <!-- Edit scheduler host value below =================================== -->
          <add property="SchedulerHost" value="tcp://localhost:555/QuartzScheduler" />
          <!--                                 =================================== -->
        </provider>
    </crystalQuartz>

    handlers节点中多了如下配置:

    <add name="CrystalQuartzPanel" verb="*" path="CrystalQuartzPanel.axd" type="CrystalQuartz.Web.PagesHandler, CrystalQuartz.Web" />

    可以看到,将CrystalQuartzPanel.axd的请求映射到了CrystalQuartz.Web.PagesHandler中

    2、window服务安装CrystalQuartz

    实际上quartz.config中也有如下配置(去掉#注释):

    # export this server to remoting context
    quartz.scheduler.exporter.type = Quartz.Simpl.RemotingSchedulerExporter, Quartz
    quartz.scheduler.exporter.port = 555
    quartz.scheduler.exporter.bindName = QuartzScheduler
    quartz.scheduler.exporter.channelType = tcp
    quartz.scheduler.exporter.channelName = httpQuartz

    这样两个程序就可以通信了。

    3、新建的网站部署到IIS,开启WindowsService,然后在浏览器里面浏览新的站点,在默认的端口后面直接输入:/CrystalQuartzPanel.axd 就看访问了

    这个页面会将quartz_jobs.xml中的触发器都加载出来,可以重新暂停、删除、立即执行,还可以新建触发器,其它复杂功能还没有仔细研究

    CrystalQuartz GitHub 地址:https://github.com/guryanovev/CrystalQuartz

  • 相关阅读:
    我对管理信息系统定位的理解
    正斜杠和反斜杠-windows、web、c语言大讨论
    java异常处理的两种方法
    使用throws抛出异常
    课后作业
    每日自学
    《梦断代码》读后感
    每日自学
    每日自学
    每日自学
  • 原文地址:https://www.cnblogs.com/chiflyzheng/p/8927738.html
Copyright © 2011-2022 走看看