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

  • 相关阅读:
    正则表达式预:
    cookie 二:
    Javascript之运动框架2
    cookie预:
    Javascript之链式运动框架1
    基于Azure的软件部署和开发系列沙龙
    在Docker中安装.NET Core(使用命令行工具)
    Xshell 无法连接虚拟机中的ubuntu的问题
    springboot09-redis
    springboot08-jpa-mysql
  • 原文地址:https://www.cnblogs.com/chiflyzheng/p/8927738.html
Copyright © 2011-2022 走看看