zoukankan      html  css  js  c++  java
  • Quartz.net创建windows服务

    序言

    安装服务

    sc create XXService binpath= "XXService.exe"  start= auto
    sc description XXService "XX服务" 
    sc start XXService
    pause

    卸载服务

    sc stop XXService
    sc delete XXService
    pause
    <?xml version="1.0" encoding="UTF-8"?>
    
     
    
    <!-- This file contains job definitions in schema version 2.0 format -->
    
    <job-scheduling-data xmlns="http://quartznet.sourceforge.net/JobSchedulingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0">
    
     
    
      <processing-directives>
    
        <overwrite-existing-data>true</overwrite-existing-data>
    
      </processing-directives>
    
     
    
      <schedule>
    
        <!--该作业用于定时更新商品库存-->
    
        <job>
    
          <name>UpdateInventoryJob</name>
    
          <group>Update</group>
    
          <description>定时更新商品库存</description>
    
          <job-type>TopshelfAndQuartz.UpdateInventoryJob,TopshelfAndQuartz</job-type>
    
          <durable>true</durable>
    
          <recover>false</recover>
    
        </job>
    
        <trigger>
    
          <cron>
    
            <name>UpdateInventoryTrigger</name>
    
            <group>Update</group>
    
            <job-name>UpdateInventoryJob</job-name>
    
            <job-group>Update</job-group>
    
            <start-time>2017-12-01T00:00:00+08:00</start-time>
    
            <cron-expression>0 0/1 * * * ?</cron-expression>
    
          </cron>
    
        </trigger>
    
      </schedule>
    
     
    
    </job-scheduling-data>

    资料

    Quartz.NET 配置文件详解

    https://www.cnblogs.com/asxinyu/p/dotnet_Opensource_project_CronNET.html

    https://www.cnblogs.com/jsenke/p/5545635.html

    https://www.cnblogs.com/qk2014/p/4869675.html

  • 相关阅读:
    c#冒泡排序
    C# 虚方法(virtual)覆盖(override) 隐藏(new) 重载
    Javascript 大括号
    C# const.static.readonly.
    热点链接(img map area)
    WeiBo返回错误码的二种方式
    Cookie跨域操作
    synchronized(this)与synchronized(class)
    线程安全场景备忘
    git新建一个分支setupstream
  • 原文地址:https://www.cnblogs.com/cnki/p/9545455.html
Copyright © 2011-2022 走看看