You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
480 KiB
JavaScript

"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[6494],{6210:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>h,contentTitle:()=>a,default:()=>x,frontMatter:()=>t,metadata:()=>u,toc:()=>g});var s=n(5893),i=n(1151),o=n(510),c=n(4996),d=n(4866),l=n(5162);const t={id:"job",title:"26.1 \u8c03\u5ea6\u4f5c\u4e1a",sidebar_label:"26.1 \u8c03\u5ea6\u4f5c\u4e1a"},a=void 0,u={id:"job",title:"26.1 \u8c03\u5ea6\u4f5c\u4e1a",description:"\ud83d\udcdd \u6a21\u5757\u66f4\u65b0\u65e5\u5fd7",source:"@site/docs/job.mdx",sourceDirName:".",slug:"/job",permalink:"/docs/job",draft:!1,unlisted:!1,editUrl:"https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/job.mdx",tags:[],version:"current",lastUpdatedBy:"\u767e\u5c0f\u50e7",lastUpdatedAt:1700800983,formattedLastUpdatedAt:"Nov 24, 2023",frontMatter:{id:"job",title:"26.1 \u8c03\u5ea6\u4f5c\u4e1a",sidebar_label:"26.1 \u8c03\u5ea6\u4f5c\u4e1a"},sidebar:"docs",previous:{title:"26. \u5b9a\u65f6\u4efb\u52a1 (Schedule)",permalink:"/docs/category/job"},next:{title:"26.2 Cron \u8868\u8fbe\u5f0f",permalink:"/docs/cron"}},h={},g=[{value:"26.1.1 \u5173\u4e8e\u8c03\u5ea6\u4f5c\u4e1a",id:"2611-\u5173\u4e8e\u8c03\u5ea6\u4f5c\u4e1a",level:2},{value:"26.1.1.1 \u4f7f\u7528\u573a\u666f",id:"26111-\u4f7f\u7528\u573a\u666f",level:3},{value:"26.1.2 \u5feb\u901f\u5165\u95e8",id:"2612-\u5feb\u901f\u5165\u95e8",level:2},{value:"26.1.2.1 \u6307\u5b9a\u4f5c\u4e1a <code>Id</code>",id:"26121-\u6307\u5b9a\u4f5c\u4e1a-id",level:3},{value:"26.1.2.2 \u591a\u4e2a\u4f5c\u4e1a\u89e6\u53d1\u5668",id:"26122-\u591a\u4e2a\u4f5c\u4e1a\u89e6\u53d1\u5668",level:3},{value:"26.1.2.3 <code>\u4e32\u884c</code> \u6267\u884c",id:"26123-\u4e32\u884c-\u6267\u884c",level:3},{value:"26.1.2.4 \u6253\u5370\u4f5c\u4e1a\u5b8c\u6574\u4fe1\u606f",id:"26124-\u6253\u5370\u4f5c\u4e1a\u5b8c\u6574\u4fe1\u606f",level:3},{value:"26.1.2.5 \u8fd0\u884c\u65f6\uff08\u52a8\u6001\uff09\u64cd\u4f5c\u4f5c\u4e1a",id:"26125-\u8fd0\u884c\u65f6\u52a8\u6001\u64cd\u4f5c\u4f5c\u4e1a",level:3},{value:"26.1.2.6 \u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027",id:"26126-\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027",level:3},{value:"26.1.2.7 <code>HTTP</code> \u8bf7\u6c42\u4f5c\u4e1a",id:"26127-http-\u8bf7\u6c42\u4f5c\u4e1a",level:3},{value:"26.1.2.8 \u59d4\u6258\u65b9\u5f0f\u4f5c\u4e1a",id:"26128-\u59d4\u6258\u65b9\u5f0f\u4f5c\u4e1a",level:3},{value:"26.1.2.9 \u975e <code>IOC/DI</code> \u9879\u76ee\u4e2d\u4f7f\u7528",id:"26129-\u975e-iocdi-\u9879\u76ee\u4e2d\u4f7f\u7528",level:3},{value:"26.1.3 \u4f5c\u4e1a\u4fe1\u606f <code>JobDetail</code> \u53ca\u6784\u5efa\u5668",id:"2613-\u4f5c\u4e1a\u4fe1\u606f-jobdetail-\u53ca\u6784\u5efa\u5668",level:2},{value:"26.1.3.1 \u5173\u4e8e\u4f5c\u4e1a\u4fe1\u606f",id:"26131-\u5173\u4e8e\u4f5c\u4e1a\u4fe1\u606f",level:3},{value:"26.1.3.2 \u5173\u4e8e\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668",id:"26132-\u5173\u4e8e\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668",level:3},{value:"26.1.3.3 \u8bbe\u7f6e\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668",id:"26133-\u8bbe\u7f6e\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668",level:3},{value:"26.1.3.4 \u4f5c\u4e1a\u4fe1\u606f/\u6784\u5efa\u5668\u989d\u5916\u6570\u636e",id:"26134-\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668\u989d\u5916\u6570\u636e",level:3},{value:"26.1.3.5 \u4f5c\u4e1a\u4fe1\u606f\u7279\u6027",id:"26135-\u4f5c\u4e1a\u4fe1\u606f\u7279\u6027",level:3},{value:"26.1.3.6 \u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa",id:"26136-\u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa",level:3},{value:"26.1.3.7 \u81ea\u5b9a\u4e49 <code>SQL</code> \u8f93\u51fa\u914d\u7f6e",id:"26137-\u81ea\u5b9a\u4e49-sql-\u8f93\u51fa\u914d\u7f6e",level:3},{value:"26.1.3.8 \u542f\u7528\u4f5c\u4e1a\u6267\u884c\u65e5\u5fd7\u8f93\u51fa",id:"26138-\u542f\u7528\u4f5c\u4e1a\u6267\u884c\u65e5\u5fd7\u8f93\u51fa",level:3},{value:"26.1.4 \u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f <code>IJob</code>",id:"2614-\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f-ijob",level:2},{value:"26.1.4.1 \u5982\u4f55\u5b9a\u4e49",id:"26141-\u5982\u4f55\u5b9a\u4e49",level:3},{value:"26.1.4.2 <code>JobExecutingContext</code> \u4e0a\u4e0b\u6587",id:"26142-jobexecutingcontext-\u4e0a\u4e0b\u6587",level:3},{value:"26.1.4.3 \u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u5b9e\u4f8b",id:"26143-\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u5b9e\u4f8b",level:3},{value:"26.1.4.4 \u4f9d\u8d56\u6ce8\u5165",id:"26144-\u4f9d\u8d56\u6ce8\u5165",level:3},{value:"26.1.4.5 \u52a8\u6001\u4f5c\u4e1a <code>DynamicJob</code>",id:"26145-\u52a8\u6001\u4f5c\u4e1a-dynamicjob",level:3},{value:"26.1.4.6 \u4f7f\u7528 <code>Roslyn</code> \u52a8\u6001\u521b\u5efa",id:"26146-\u4f7f\u7528-roslyn-\u52a8\u6001\u521b\u5efa",level:3},{value:"26.1.4.7 \u4f5c\u4e1a\u6267\u884c\u5f02\u5e38\u5904\u7406",id:"26147-\u4f5c\u4e1a\u6267\u884c\u5f02\u5e38\u5904\u7406",level:3},{value:"26.1.4.8 \u4f5c\u4e1a\u6267\u884c\u5f02\u5e38\u56de\u9000\u7b56\u7565",id:"26148-\u4f5c\u4e1a\u6267\u884c\u5f02\u5e38\u56de\u9000\u7b56\u7565",level:3},{value:"26.1.4.9 \u4f5c\u4e1a\u8c03\u5ea6\u5668\u88ab\u53d6\u6d88\u5904\u7406",id:"26149-\u4f5c\u4e1a\u8c03\u5ea6\u5668\u88ab\u53d6\u6d88\u5904\u7406",level:3},{value:"26.1.4.10 <code>HTTP</code> \u8bf7\u6c42\u4f5c\u4e1a",id:"261410-http-\u8bf7\u6c42\u4f5c\u4e1a",level:3},{value:"26.1.4.11 \u8bbe\u7f6e\u672c\u6b21\u6267\u884c\u7ed3\u679c",id:"261411-\u8bbe\u7f6e\u672c\u6b21\u6267\u884c\u7ed3\u679c",level:3},{value:"26.1.5 \u4f5c\u4e1a\u89e6\u53d1\u5668 <code>Trigger</code> \u53ca\u6784\u5efa\u5668",id:"2615-\u4f5c\u4e1a\u89e6\u53d1\u5668-trigger-\u53ca\u6784\u5efa\u5668",level:2},{value:"26.1.5.1 \u5173\u4e8e\u4f5c\u4e1a\u89e6\u53d1\u5668",id:"26151-\u5173\u4e8e\u4f5c\u4e1a\u89e6\u53d1\u5668",level:3},{value:"26.1.5.2 \u4f5c\u4e1a\u89e6\u53d1\u5668\u72b6\u6001",id:"26152-\u4f5c\u4e1a\u89e6\u53d1\u5668\u72b6\u6001",level:3},{value:"26.1.5.3 \u5173\u4e8e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668",id:"26153-\u5173\u4e8e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668",level:3},{value:"26.1.5.4 \u5185\u7f6e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668",id:"26154-\u5185\u7f6e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668",level:3},{value:"26.1.5.5 \u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668",id:"26155-\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668",level:3},{value:"26.1.5.6 \u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027\u53ca\u81ea\u5b9a\u4e49",id:"26156-\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027\u53ca\u81ea\u5b9a\u4e49",level:3},{value:"26.1.5.7 \u8bbe\u7f6e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668",id:"26157-\u8bbe\u7f6e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668",level:3},{value:"26.1.5.8 \u4f5c\u4e1a\u89e6\u53d1\u5668\u6301\u4e45\u5316\u65b9\u6cd5",id:"26158-\u4f5c\u4e1a\u89e6\u53d1\u5668\u6301\u4e45\u5316\u65b9\u6cd5",level:3},{value:"26.1.5.9 \u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa",id:"26159-\u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa",level:3},{value:"26.1.5.10 \u81ea\u5b9a\u4e49 <code>SQL</code> \u8f93\u51fa\u914d\u7f6e",id:"261510-\u81ea\u5b9a\u4e49-sql-\u8f93\u51fa\u914d\u7f6e",level:3},{value:"26.1.5.11 \u67e5\u770b\u6700\u8fd1\u8fd0\u884c\u8bb0\u5f55",id:"261511-\u67e5\u770b\u6700\u8fd1\u8fd0\u884c\u8bb0\u5f55",level:3},{value:"26.1.5.12 \u66f4\u6539\u4f5c\u4e1a\u89e6\u53d1\u5668\u89e6\u53d1\u65f6\u95f4",id:"261512-\u66f4\u6539\u4f5c\u4e1a\u89e6\u53d1\u5668\u89e6\u53d1\u65f6\u95f4",level:3},{value:"26.1.6 \u4f5c\u4e1a\u8ba1\u5212 <code>Scheduler</code> \u53ca\u6784\u5efa\u5668",id:"2616-\u4f5c\u4e1a\u8ba1\u5212-scheduler-\u53ca\u6784\u5efa\u5668",level:2},{value:"26.1.6.1 \u5173\u4e8e\u4f5c\u4e1a\u8ba1\u5212",id:"26161-\u5173\u4e8e\u4f5c\u4e1a\u8ba1\u5212",level:3},{value:"26.1.6.2 \u5173\u4e8e\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668",id:"26162-\u5173\u4e8e\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668",level:3},{value:"26.1.6.3 \u8bbe\u7f6e\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668",id:"26163-\u8bbe\u7f6e\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668",level:3},{value:"26.1.6.4 \u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u6301\u4e45\u5316\u65b9\u6cd5",id:"26164-\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u6301\u4e45\u5316\u65b9\u6cd5",level:3},{value:"26.1.6.5 \u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa",id:"26165-\u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa",level:3},{value:"26.1.7 \u4f5c\u4e1a\u8c03\u5ea6\u5668 <code>ScheduleOptionsBuilder</code> \u914d\u7f6e\u9009\u9879",id:"2617-\u4f5c\u4e1a\u8c03\u5ea6\u5668-scheduleoptionsbuilder-\u914d\u7f6e\u9009\u9879",level:2},{value:"26.1.7.1 \u5173\u4e8e <code>ScheduleOptionsBuilder</code>",id:"26171-\u5173\u4e8e-scheduleoptionsbuilder",level:3},{value:"26.1.7.2 <code>ScheduleOptionsBuilder</code> \u5185\u7f6e\u5c5e\u6027\u548c\u65b9\u6cd5",id:"26172-scheduleoptionsbuilder-\u5185\u7f6e\u5c5e\u6027\u548c\u65b9\u6cd5",level:3},{value:"26.1.8 \u4f5c\u4e1a\u76d1\u89c6\u5668 <code>IJobMonitor</code>",id:"2618-\u4f5c\u4e1a\u76d1\u89c6\u5668-ijobmonitor",level:2},{value:"26.1.8.1 \u5173\u4e8e\u53c2\u6570 <code>JobExecutionContext</code>",id:"26181-\u5173\u4e8e\u53c2\u6570-jobexecutioncontext",level:3},{value:"26.1.9 \u4f5c\u4e1a\u6267\u884c\u5668 <code>IJobExecutor</code>",id:"2619-\u4f5c\u4e1a\u6267\u884c\u5668-ijobexecutor",level:2},{value:"26.1.9.1 \u5b9e\u73b0\u91cd\u8bd5\u7b56\u7565",id:"26191-\u5b9e\u73b0\u91cd\u8bd5\u7b56\u7565",level:3},{value:"26.1.9.2 \u5b9e\u73b0\u8d85\u65f6\u63a7\u5236",id:"26192-\u5b9e\u73b0\u8d85\u65f6\u63a7\u5236",level:3},{value:"26.1.9.3 \u66f4\u591a\u63a7\u5236",id:"26193-\u66f4\u591a\u63a7\u5236",level:3},{value:"26.1.10 \u4f5c\u4e1a\u8ba1\u5212\u5de5\u5382 <code>ISchedulerFactory</code>",id:"26110-\u4f5c\u4e1a\u8ba1\u5212\u5de5\u5382-ischedulerfactory",level:2},{value:"26.1.10.1 \u67e5\u627e\u6240\u6709\u4f5c\u4e1a",id:"261101-\u67e5\u627e\u6240\u6709\u4f5c\u4e1a",level:3},{value:"26.1.10.2 \u67e5\u627e\u4e0b\u4e00\u6279\u89e6\u53d1\u7684\u4f5c\u4e1a",id:"261102-\u67e5\u627e\u4e0b\u4e00\u6279\u89e6\u53d1\u7684\u4f5c\u4e1a",level:3},{value:"26.1.10.3 \u83b7\u53d6\u5355\u4e2a\u4f5c\u4e1a",id:"261103-\u83b7\u53d6\u5355\u4e2a\u4f5c\u4e1a",level:3},{value:"26.1.10.4 \u4fdd\u5b58\u4f5c\u4e1a",id:"261104-\u4fdd\u5b58\u4f5c\u4e1a",level:3},{value:"26.1.10.5 \u6dfb\u52a0\u4f5c\u4e1a",id:"261105-\u6dfb\u52a0\u4f5c\u4e1a",level:3},{value:"26.1.10.6 \u66f4\u65b0\u4f5c\u4e1a",id:"261106-\u66f4\u65b0\u4f5c\u4e1a",level:3},{value:"26.1.10.7 \u5220\u9664\u4f5c\u4e1a",id:"261107-\u5220\u9664\u4f5c\u4e1a",level:3},{value:"26.1.10.8 \u68c0\u67e5\u4f5c\u4e1a\u662f\u5426\u5b58\u5728",id:"261108-\u68c0\u67e5\u4f5c\u4e1a\u662f\u5426\u5b58\u5728",level:3},{value:"26.1.10.9 \u542f\u52a8\u6240\u6709\u4f5c\u4e1a",id:"261109-\u542f\u52a8\u6240\u6709\u4f5c\u4e1a",level:3},{value:"26.1.10.10 \u6682\u505c\u6240\u6709\u4f5c\u4e1a",id:"2611010-\u6682\u505c\u6240\u6709\u4f5c\u4e1a",level:3},{value:"26.1.10.11 \u5220\u9664\u6240\u6709\u4f5c\u4e1a",id:"2611011-\u5220\u9664\u6240\u6709\u4f5c\u4e1a",level:3},{value:"26.1.10.12 \u5f3a\u5236\u89e6\u53d1\u6240\u6709\u4f5c\u4e1a\u6301\u4e45\u5316\u64cd\u4f5c",id:"2611012-\u5f3a\u5236\u89e6\u53d1\u6240\u6709\u4f5c\u4e1a\u6301\u4e45\u5316\u64cd\u4f5c",level:3},{value:"26.1.10.13 \u6821\u5bf9\u6240\u6709\u4f5c\u4e1a",id:"2611013-\u6821\u5bf9\u6240\u6709\u4f5c\u4e1a",level:3},{value:"26.1.10.14 \u5f3a\u5236\u5524\u9192\u4f5c\u4e1a\u8c03\u5ea6\u5668",id:"2611014-\u5f3a\u5236\u5524\u9192\u4f5c\u4e1a\u8c03\u5ea6\u5668",level:3},{value:"26.1.10.15 \u7acb\u5373\u6267\u884c\u4f5c\u4e1a",id:"2611015-\u7acb\u5373\u6267\u884c\u4f5c\u4e1a",level:3},{value:"26.1.11 \u4f5c\u4e1a\u8ba1\u5212 <code>IScheduler</code>",id:"26111-\u4f5c\u4e1a\u8ba1\u5212-ischeduler",level:2},{value:"26.1.11.1 \u83b7\u53d6 <code>SchedulerModel</code> \u5b9e\u4f8b",id:"261111-\u83b7\u53d6-schedulermodel-\u5b9e\u4f8b",level:3},{value:"26.1.11.2 \u83b7\u53d6 <code>SchedulerBuilder</code>",id:"261112-\u83b7\u53d6-schedulerbuilder",level:3},{value:"26.1.11.3 \u83b7\u53d6 <code>JobBuilder</code>",id:"261113-\u83b7\u53d6-jobbuilder",level:3},{value:"26.1.11.4 \u83b7\u53d6 <code>TriggerBuilder</code> \u96c6\u5408",id:"261114-\u83b7\u53d6-triggerbuilder-\u96c6\u5408",level:3},{value:"26.1.11.5 \u83b7\u53d6\u5355\u4e2a <code>TriggerBuilder</code>",id:"261115-\u83b7\u53d6\u5355\u4e2a-triggerbuilder",level:3},{value:"26.1.11.6 \u83b7\u53d6\u4f5c\u4e1a\u4fe1\u606f",id:"261116-\u83b7\u53d6\u4f5c\u4e1a\u4fe1\u606f",level:3},{value:"26.1.11.7 \u83b7\u53d6\u4f5c\u4e1a\u89e6\u53d1\u5668\u96c6\u5408",id:"261117-\u83b7\u53d6\u4f5c\u4e1a\u89e6\u53d1\u5668\u96c6\u5408",level:3},{value:"26.1.11.8 \u83b7\u53d6\u5355\u4e2a\u4f5c\u4e1a\u89e6\u53d1\u5668",id:"261118-\u83b7\u53d6\u5355\u4e2a\u4f5c\u4e1a\u89e6\u53d1\u5668",level:3},{value:"26.1.11.9 \u4fdd\u5b58\u4f5c\u4e1a\u89e6\u53d1\u5668",id:"261119-\u4fdd\u5b58\u4f5c\u4e1a\u89e6\u53d1\u5668",level:3},{value:"26.1.11.10 \u66f4\u65b0\u4f5c\u4e1a\u4fe1\u606f",id:"2611110-\u66f4\u65b0\u4f5c\u4e1a\u4fe1\u606f",level:3},{value:"26.1.11.11 \u6dfb\u52a0\u4f5c\u4e1a\u89e6\u53d1\u5668",id:"2611111-\u6dfb\u52a0\u4f5c\u4e1a\u89e6\u53d1\u5668",level:3},{value:"26.1.11.12 \u66f4\u65b0\u4f5c\u4e1a\u89e6\u53d1\u5668",id:"2611112-\u66f4\u65b0\u4f5c\u4e1a\u89e6\u53d1\u5668",level:3},{value:"26.1.11.13 \u5220\u9664\u4f5c\u4e1a\u89e6\u53d1\u5668",id:"2611113-\u5220\u9664\u4f5c\u4e1a\u89e6\u53d1\u5668",level:3},{value:"26.1.11.14 \u5220\u9664\u5f53\u524d\u4f5c\u4e1a",id:"2611114-\u5220\u9664\u5f53\u524d\u4f5c\u4e1a",level:3},{value:"26.1.11.15 \u5224\u65ad\u4f5c\u4e1a\u89e6\u53d1\u5668\u662f\u5426\u5b58\u5728",id:"2611115-\u5224\u65ad\u4f5c\u4e1a\u89e6\u53d1\u5668\u662f\u5426\u5b58\u5728",level:3},{value:"26.1.11.16 \u542f\u52a8\u4f5c\u4e1a\u89e6\u53d1\u5668",id:"2611116-\u542f\u52a8\u4f5c\u4e1a\u89e6\u53d1\u5668",level:3},{value:"26.1.11.17 \u6682\u505c\u4f5c\u4e1a\u89e6\u53d1\u5668",id:"2611117-\u6682\u505c\u4f5c\u4e1a\u89e6\u53d1\u5668",level:3},{value:"26.1.11.18 \u5f3a\u5236\u89e6\u53d1\u4f5c\u4e1a\u6301\u4e45\u5316\u64cd\u4f5c",id:"2611118-\u5f3a\u5236\u89e6\u53d1\u4f5c\u4e1a\u6301\u4e45\u5316\u64cd\u4f5c",level:3},{value:"26.1.11.19 \u542f\u52a8\u5f53\u524d\u4f5c\u4e1a",id:"2611119-\u542f\u52a8\u5f53\u524d\u4f5c\u4e1a",level:3},{value:"26.1.11.20 \u6682\u505c\u5f53\u524d\u4f5c\u4e1a",id:"2611120-\u6682\u505c\u5f53\u524d\u4f5c\u4e1a",level:3},{value:"26.1.11.21 \u6821\u5bf9\u5f53\u524d\u4f5c\u4e1a",id:"2611121-\u6821\u5bf9\u5f53\u524d\u4f5c\u4e1a",level:3},{value:"26.1.11.22 \u5f3a\u5236\u5237\u65b0\u5f53\u524d\u4f5c\u4e1a",id:"2611122-\u5f3a\u5236\u5237\u65b0\u5f53\u524d\u4f5c\u4e1a",level:3},{value:"26.1.11.23 \u8f6c\u6362\u6210 <code>JSON</code> \u683c\u5f0f",id:"2611123-\u8f6c\u6362\u6210-json-\u683c\u5f0f",level:3},{value:"26.1.11.24 \u8f6c\u6362\u6210\u53ef\u679a\u4e3e\u5b57\u5178",id:"2611124-\u8f6c\u6362\u6210\u53ef\u679a\u4e3e\u5b57\u5178",level:3},{value:"26.1.11.25 \u7acb\u5373\u6267\u884c\u4f5c\u4e1a",id:"2611125-\u7acb\u5373\u6267\u884c\u4f5c\u4e1a",level:3},{value:"26.1.12 \u4f5c\u4e1a\u6301\u4e45\u5316\u5668 <code>IJobPersistence</code>",id:"26112-\u4f5c\u4e1a\u6301\u4e45\u5316\u5668-ijobpersistence",level:2},{value:"26.1.12.1 \u5173\u4e8e\u4f5c\u4e1a\u6301\u4e45\u5316\u5668",id:"261121-\u5173\u4e8e\u4f5c\u4e1a\u6301\u4e45\u5316\u5668",level:3},{value:"26.1.12.2 \u5b9e\u73b0\u4f5c\u4e1a\u6301\u4e45\u5316\u5668",id:"261122-\u5b9e\u73b0\u4f5c\u4e1a\u6301\u4e45\u5316\u5668",level:3},{value:"26.1.12.3 <code>IJobPersistence</code> \u8be6\u7ec6\u8bf4\u660e",id:"261123-ijobpersistence-\u8be6\u7ec6\u8bf4\u660e",level:3},{value:"26.1.12.4 \u5404\u7c7b\u6570\u636e\u5e93\u521b\u5efa\u4f5c\u4e1a\u6301\u4e45\u5316\u8868\u8bed\u53e5",id:"261124-\u5404\u7c7b\u6570\u636e\u5e93\u521b\u5efa\u4f5c\u4e1a\u6301\u4e45\u5316\u8868\u8bed\u53e5",level:3},{value:"26.1.13 \u4f5c\u4e1a\u96c6\u7fa4\u63a7\u5236",id:"26113-\u4f5c\u4e1a\u96c6\u7fa4\u63a7\u5236",level:2},{value:"26.1.13.1 \u5b9e\u73b0\u96c6\u7fa4\u6545\u969c\u8f6c\u79fb",id:"261131-\u5b9e\u73b0\u96c6\u7fa4\u6545\u969c\u8f6c\u79fb",level:3},{value:"26.1.13.2 \u4f5c\u4e1a\u96c6\u7fa4\u6570\u636e\u5e93\u8868\u8bbe\u8ba1",id:"261132-\u4f5c\u4e1a\u96c6\u7fa4\u6570\u636e\u5e93\u8868\u8bbe\u8ba1",level:3},{value:"26.1.13.3 \u5982\u4f55\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861",id:"261133-\u5982\u4f55\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861",level:3},{value:"26.1.14 <code>ScheduleServe</code> \u9759\u6001\u7c7b",id:"26114-scheduleserve-\u9759\u6001\u7c7b",level:2},{value:"26.1.15 \u5982\u4f55\u90e8\u7f72",id:"26115-\u5982\u4f55\u90e8\u7f72",level:2},{value:"26.1.15.1 <code>Worker Service</code> \u4ee3\u7801\u96c6\u6210\u4f8b\u5b50",id:"261151-worker-service-\u4ee3\u7801\u96c6\u6210\u4f8b\u5b50",level:3},{value:"26.1.16 <code>Dashboard</code> \u770b\u677f\u529f\u80fd",id:"26116-dashboard-\u770b\u677f\u529f\u80fd",level:2},{value:"26.1.16.1 \u5728 <code>Worker Service</code> \u4e2d\u6ce8\u518c",id:"261161-\u5728-worker-service-\u4e2d\u6ce8\u518c",level:3},{value:"26.1.16.2 \u770b\u677f\u914d\u7f6e\u9009\u9879",id:"261162-\u770b\u677f\u914d\u7f6e\u9009\u9879",level:3},{value:"26.1.17 \u5e38\u89c1\u95ee\u9898",id:"26117-\u5e38\u89c1\u95ee\u9898",level:2},{value:"26.1.17.1 \u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u4e2d\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u5b58\u5728\u504f\u5dee",id:"261171-\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u4e2d\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u5b58\u5728\u504f\u5dee",level:3},{value:"26.1.17.2 \u4f5c\u4e1a\u89e6\u53d1\u5668\u53c2\u6570\u5e8f\u5217\u5316/\u53cd\u5e8f\u5217\u5316",id:"261172-\u4f5c\u4e1a\u89e6\u53d1\u5668\u53c2\u6570\u5e8f\u5217\u5316\u53cd\u5e8f\u5217\u5316",level:3},{value:"26.1.17.3 \u4f5c\u4e1a\u4fe1\u606f\u989d\u5916\u6570\u636e\u5e8f\u5217\u5316/\u53cd\u5e8f\u5217\u5316",id:"261173-\u4f5c\u4e1a\u4fe1\u606f\u989d\u5916\u6570\u636e\u5e8f\u5217\u5316\u53cd\u5e8f\u5217\u5316",level:3},{value:"26.1.17.4 \u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u5ef6\u8fdf\u5904\u7406",id:"261174-\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u5ef6\u8fdf\u5904\u7406",level:3},{value:"26.1.17.5 \u5b9a\u65f6\u4efb\u52a1\u90e8\u7f72\u8bf4\u660e",id:"261175-\u5b9a\u65f6\u4efb\u52a1\u90e8\u7f72\u8bf4\u660e",level:3},{value:"26.1.18 \u53cd\u9988\u4e0e\u5efa\u8bae",id:"26118-\u53cd\u9988\u4e0e\u5efa\u8bae",level:2}];function j(e){const r={a:"a",admonition:"admonition",code:"code",del:"del",h2:"h2",h3:"h3",hr:"hr",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.a)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"\ud83d\udcdd \u6a21\u5757\u66f4\u65b0\u65e5\u5fd7"}),(0,s.jsx)("div",{children:(0,s.jsxs)("div",{children:[(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u65b0\u7279\u6027"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"Http"})," \u4f5c\u4e1a\u8bf7\u6c42\u5934 ",(0,s.jsx)(r.code,{children:"Headers"})," \u548c\u4f5c\u4e1a\u5206\u7ec4 ",(0,s.jsx)(r.code,{children:"Group"})," \u548c\u63cf\u8ff0 ",(0,s.jsx)(r.code,{children:"Description"})," \u652f\u6301 ",(0,s.jsx)("sup",{children:"4.8.8.46"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.10.09"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I85Z7S",children:"#I85Z7S"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u770b\u677f\u5217\u8868\u652f\u6301\u4f5c\u4e1a\u5206\u7ec4\u540d\u6392\u5e8f ",(0,s.jsx)("sup",{children:"4.8.8.43"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.09.14"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I7YQ9V",children:"#I7YQ9V"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u4f5c\u4e1a\u8ba1\u5212 ",(0,s.jsx)(r.code,{children:"OnChanged"})," \u4e8b\u4ef6\u5904\u7406 ",(0,s.jsx)("sup",{children:"4.8.8.29"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.06.25"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/e4c4cf1d418f3cc2291eca7d7dd1c8b62d17b0e9",children:"e4c4cf1"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u652f\u6301\u4e8c\u7ea7\u865a\u62df\u76ee\u5f55 ",(0,s.jsx)(r.code,{children:"VisualPath"})," \u914d\u7f6e\u90e8\u7f72 ",(0,s.jsx)("sup",{children:"4.8.8.20"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.05.18"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Sundial/issues/I740IA",children:"#I740IA"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u5de5\u5382 ",(0,s.jsx)(r.code,{children:"IJobFactory"})," \u652f\u6301 ",(0,s.jsx)("sup",{children:"4.8.8.13"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.05.08"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/ad58dd3141ed40e58cd486895ac6c1f21803797c",children:"ad58dd3"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"Schedular.CompileCSharpClassCode(code)"})," \u652f\u6301\u52a8\u6001\u7f16\u8bd1\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u4ee3\u7801 ",(0,s.jsx)("sup",{children:"4.8.8.7"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.30"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/fe1e8a1768c7020477684689b35a2a1349ec2b01",children:"fe1e8a1"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u652f\u6301\u914d\u7f6e ",(0,s.jsx)(r.code,{children:"IJob"})," \u6267\u884c\u5f02\u5e38 ",(0,s.jsx)(r.code,{children:"FallbackAsync"})," \u56de\u9000\u7b56\u7565 ",(0,s.jsx)("sup",{children:"4.8.8.6"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.25"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/7671489a46ec7c957e92b7fbf9836e27f9077e24",children:"7671489"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u652f\u6301\u5728\u975e ",(0,s.jsx)(r.code,{children:"IOC/DI"})," \u9879\u76ee\u7c7b\u578b\u4e2d\u4f7f\u7528 ",(0,s.jsx)("sup",{children:"4.8.8.5"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.24"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Sundial/issues/I6YJNB",children:"#I6YJNB"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u770b\u677f\u652f\u6301\u81ea\u5b9a\u4e49\u5237\u65b0\u9891\u7387 ",(0,s.jsx)(r.code,{children:"SyncRate"})," \u529f\u80fd ",(0,s.jsx)("sup",{children:"4.8.7.43"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.12"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/703b465f41510d86976d325cd31d7f8eba3a31ec",children:"703b465"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u770b\u677f\u652f\u6301\u5b8c\u5168\u81ea\u5b9a\u4e49 ",(0,s.jsx)(r.code,{children:"RequestPath"})," \u5165\u53e3\u5730\u5740\u529f\u80fd ",(0,s.jsx)("sup",{children:"4.8.7.34"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.04"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/24736f6421dd5aa90289fbb9bc519e6ef55e667f",children:"24736f6"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," ",(0,s.jsxs)(r.strong,{children:["\u5b9a\u65f6\u4efb\u52a1\u4e00\u7cfb\u5217 ",(0,s.jsx)(r.code,{children:".AlterTo"})," \u4fee\u6539\u4f5c\u4e1a\u89e6\u53d1\u5668\u89e6\u53d1\u65f6\u95f4\u4fbf\u6377\u65b9\u6cd5"]})," ",(0,s.jsx)("sup",{children:"4.8.7.31"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.31"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/0349017902835bed91041fb3ea1ee987b0a81bbb",children:"0349017"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u770b\u677f ",(0,s.jsx)(r.code,{children:"UI"})," \u4f5c\u4e1a\u5217\u8868 ",(0,s.jsx)(r.code,{children:"\u6700\u8fd1\u6267\u884c\u65f6\u95f4"})," \u5217\u548c\u4f18\u5316\u663e\u793a\u6548\u679c ",(0,s.jsx)("sup",{children:"4.8.7.12"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.15"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/26462a84e553e39ce4cddd5128833ff732c85f3e",children:"26462a8"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/cb5dd17969244987b847fcd96825d28b243a5b9f",children:"cb5dd17"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u4f5c\u4e1a\u8ba1\u5212/\u5de5\u5382\u7acb\u5373\u6267\u884c ",(0,s.jsx)(r.code,{children:"RunJob"})," \u65b9\u6cd5 ",(0,s.jsx)("sup",{children:"4.8.7.11"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.15"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6LD9X",children:"#I6LD9X"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u770b\u677f ",(0,s.jsx)(r.code,{children:"UI"})," \u63d0\u4f9b\u7acb\u5373\u6267\u884c\u529f\u80fd ",(0,s.jsx)("sup",{children:"4.8.7.11"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.15"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6LD9X",children:"#I6LD9X"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u4f5c\u4e1a\u6267\u884c\u4e0a\u4e0b\u6587 ",(0,s.jsx)(r.code,{children:"JobExecutionContext"})," \u670d\u52a1\u63d0\u4f9b\u5668 ",(0,s.jsx)(r.code,{children:"ServiceProvider"})," \u5c5e\u6027 ",(0,s.jsx)("sup",{children:"4.8.7.10"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.14"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/02586f83edb4f98e4801ae65080c2d6aa5545763",children:"02586f8"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," ",(0,s.jsxs)(r.strong,{children:["\u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"HTTP"})," \u4f5c\u4e1a\uff0c\u652f\u6301\u5b9a\u65f6\u8bf7\u6c42\u4e92\u8054\u7f51 ",(0,s.jsx)(r.code,{children:"URL"})," \u5730\u5740"]})," ",(0,s.jsx)("sup",{children:"4.8.7.7"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.11"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/01d446620c20e373f198195797896d8c96feeb15",children:"01d4466"})]}),"\n"]}),"\n"]}),"\n"]}),(0,s.jsxs)(n,{style:{marginLeft:50},children:[(0,s.jsx)("summary",{children:"\u67e5\u770b\u53d8\u5316"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:'services.AddSchedule(options =>\r\n{\r\n options.AddHttpJob(request =>\r\n {\r\n request.RequestUri = "https://www.chinadot.net";\r\n request.HttpMethod = HttpMethod.Get;\r\n // request.Body = "{}"; // \u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u4f53\r\n }, Triggers.PeriodSeconds(5));\r\n});\n'})})})]}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," ",(0,s.jsxs)(r.strong,{children:["\u5b9a\u65f6\u4efb\u52a1\u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Trigger"})," \u6267\u884c\u7ed3\u679c ",(0,s.jsx)(r.code,{children:"Result"})," \u548c\u6267\u884c\u8017\u65f6 ",(0,s.jsx)(r.code,{children:"ElapsedTime"})," \u5c5e\u6027"]})," ",(0,s.jsx)("sup",{children:"4.8.7.7"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.11"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/01d446620c20e373f198195797896d8c96feeb15",children:"01d4466"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," ",(0,s.jsxs)(r.strong,{children:["\u5b9a\u65f6\u4efb\u52a1\u4f5c\u4e1a\u770b\u677f\u652f\u6301\u67e5\u770b\u4f5c\u4e1a\u89e6\u53d1\u5668\u6267\u884c\u7ed3\u679c ",(0,s.jsx)(r.code,{children:"Result"})," \u548c\u6267\u884c\u8017\u65f6 ",(0,s.jsx)(r.code,{children:"ElapsedTime"})," \u5c5e\u6027"]})," ",(0,s.jsx)("sup",{children:"4.8.7.7"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.11"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/01d446620c20e373f198195797896d8c96feeb15",children:"01d4466"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u4f11\u7720\u65f6\u957f\u548c\u5524\u9192\u65f6\u673a\u65e5\u5fd7\u8f93\u51fa ",(0,s.jsx)("sup",{children:"4.8.7.6"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.08"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6LANE",children:"#I6LANE"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"IScheduler.[Try]UpdateDetail(builder => {})"})," \u548c ",(0,s.jsx)(r.code,{children:"IScheduler.[Try]UpdateTrigger(triggerId, builder => {})"})," \u91cd\u8f7d\u65b9\u6cd5 ",(0,s.jsx)("sup",{children:"4.8.6"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.02.08"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/6e43a542f1a7e10bf996c6e0179a40d434d8682e",children:"6e43a54"})]}),"\n"]}),"\n"]}),"\n"]}),(0,s.jsxs)(n,{style:{marginLeft:50},children:[(0,s.jsx)("summary",{children:"\u67e5\u770b\u53d8\u5316"}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:"\u66f4\u65b0\u4f5c\u4e1a\u4fe1\u606f"}),"\n"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,8}",children:'// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = Scheduler.TryUpdateDetail(jobBuilder =>\r\n{\r\n jobBuilder.SetDescription("~~~");\r\n}, out var jobDetail);\r\n\r\n// \u65e0\u8fd4\u56de\u503c\r\nscheduler.UpdateDetail(jobBuilder =>\r\n{\r\n jobBuilder.SetDescription("~~~");\r\n});\n'})}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:"\u66f4\u65b0\u4f5c\u4e1a\u89e6\u53d1\u5668"}),"\n"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,8}",children:'// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = scheduler.TryUpdateTrigger("triggerId", triggerBuilder =>\r\n{\r\n triggerBuilder.SetDescription("~~");\r\n}, out var trigger);\r\n\r\n// \u65e0\u8fd4\u56de\u503c\r\nscheduler.UpdateTrigger("triggerId", triggerBuilder =>\r\n{\r\n triggerBuilder.SetDescription("~~");\r\n});\n'})})]})]}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"Dashboard"})," \u53ef\u81ea\u5b9a\u4e49\u5165\u53e3\u5730\u5740 ",(0,s.jsx)(r.code,{children:"/schedule"})," ",(0,s.jsx)("sup",{children:"4.8.5.6"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.02.02"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/c5639f5b8d1ae5164bf812540aeb98f90487e855",children:"c5639f5"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u4e0a\u4e0b\u6587 ",(0,s.jsx)(r.code,{children:"RunId"})," \u5c5e\u6027\uff0c\u7528\u4e8e\u6807\u8bc6\u5355\u6b21\u4f5c\u4e1a\u89e6\u53d1\u5668\u6267\u884c ",(0,s.jsx)("sup",{children:"4.8.5.1"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.01.30"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/1aac4707d270cb0fe66eab67490d946029a9e41d",children:"1aac470"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"Dashboard"})," \u67e5\u770b\u4f5c\u4e1a\u89e6\u53d1\u5668\u6700\u8fd1\u8fd0\u884c\u8bb0\u5f55\u529f\u80fd ",(0,s.jsx)("sup",{children:"4.8.4.3"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.01.03"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/e7d24d84bcc448b0a13f8e0b76328669261af44b",children:"e7d24d8"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"trigger.GetTimelines()"})," \u83b7\u53d6\u6700\u8fd1 ",(0,s.jsx)(r.code,{children:"10"})," \u6761\u8fd0\u884c\u8bb0\u5f55\u5217\u8868 ",(0,s.jsx)("sup",{children:"4.8.4.3"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.01.03"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/e7d24d84bcc448b0a13f8e0b76328669261af44b",children:"e7d24d8"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," ",(0,s.jsxs)(r.strong,{children:["\u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"Dashboard"})," \u770b\u677f"]})," ",(0,s.jsx)("sup",{children:"4.8.4"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.30"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/d3f966921dfa757c12c2bd071fb19fc166a2f24e",children:"d3f9669"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"IScheduler.GetEnumerable()"})," \u65b9\u6cd5\uff0c\u53ef\u5c06\u4f5c\u4e1a\u8ba1\u5212\u8f6c\u6362\u6210\u53ef\u679a\u4e3e\u5b57\u5178 ",(0,s.jsx)("sup",{children:"4.8.4"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.30"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/4d5235c37a9ef5e66e92847e65ef9786bcd7387c",children:"4d5235c"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u914d\u7f6e\u9009\u9879 ",(0,s.jsx)(r.code,{children:"options.JobDetail.LogEnabled"})," \u914d\u7f6e\uff0c\u53ef\u81ea\u52a8\u8f93\u51fa\u6267\u884c\u65e5\u5fd7 ",(0,s.jsx)("sup",{children:"4.8.3.7"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.14"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/58d2c20de05dc458b206863f7814e89866e7522b",children:"58d2c20"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," ",(0,s.jsxs)(r.strong,{children:["\u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"IScheduler"})," \u5bf9\u8c61\u6bcf\u6b21\u64cd\u4f5c\u540e\u81ea\u52a8\u5237\u65b0\u548c\u63d0\u4f9b\u624b\u52a8\u5237\u65b0 ",(0,s.jsx)(r.code,{children:"Reload()"})," \u65b9\u6cd5"]})," ",(0,s.jsx)("sup",{children:"4.8.3.3"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.09"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I65EQ1#note_15047484_link",children:"#I65EQ1"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u95f4\u9694\u5206\u949f\u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Triggers.PeriodMinutes(5)"})," \u548c ",(0,s.jsx)(r.code,{children:"[PeriodMinutes(5)]"})," \u7279\u6027 ",(0,s.jsx)("sup",{children:"4.8.2.8"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.01"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/8e1f06fa2161ee2bf8bcea29af8aaa5a60ef9db9",children:"8e1f06f"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u5de5\u4f5c\u65e5\u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Triggers.Workday()"})," \u548c ",(0,s.jsx)(r.code,{children:"[Workday]"})," \u7279\u6027 ",(0,s.jsx)("sup",{children:"4.8.2.6"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.30"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/28b2d20b3f6034a4cdf5827576c34412315fbb15",children:"28b2d20"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u4f5c\u4e1a\u6821\u5bf9\u529f\u80fd\uff0c\u53ef\u5bf9\u8bef\u5dee\u8fdb\u884c\u6821\u6b63 ",(0,s.jsx)("sup",{children:"4.8.2.6"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.30"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/f725a252e6a89f9dea6489d4e54452077b1935e5",children:"f725a25"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," ",(0,s.jsxs)(r.strong,{children:["\u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"Triggers"})," \u6240\u6709\u5e26 ",(0,s.jsx)(r.code,{children:"At"})," \u7684 ",(0,s.jsx)(r.code,{children:"Cron"})," \u8868\u8fbe\u5f0f\u89e6\u53d1\u5668\u6784\u5efa\u5668\u53ca\u7279\u6027"]})," ",(0,s.jsx)("sup",{children:"4.8.2.5"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.29"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Sundial/issues/I63PLR",children:"#I63PLR"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1\u6279\u91cf\u6dfb\u52a0 ",(0,s.jsx)(r.code,{children:"SchedulerBuilder"})," \u4f5c\u4e1a\u529f\u80fd ",(0,s.jsx)("sup",{children:"4.8.2.4"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.29"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/5faa67b7817459cb0ee0add86a6e53c17ff51a05",children:"5faa67b"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"BuildSqlType"})," \u914d\u7f6e\uff0c\u53ef\u8bbe\u7f6e\u751f\u6210\u4e0d\u540c\u6570\u636e\u5e93\u7c7b\u578b\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u8bed\u53e5 ",(0,s.jsx)("sup",{children:"4.8.2.3"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.29"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/293f9bce34fc4f70eacae1043ed697d31da88409",children:"293f9bc"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/pulls/675",children:"!675"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u548c ",(0,s.jsx)(r.code,{children:"Trigger"})," \u81ea\u5b9a\u4e49 ",(0,s.jsx)(r.code,{children:"ConvertToSQL"})," \u8f93\u51fa ",(0,s.jsx)(r.code,{children:"SQL"})," \u914d\u7f6e ",(0,s.jsx)("sup",{children:"4.8.2"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.27"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/0bb9d8f1f3606af145b44c2984b87fdc020f02e1",children:"0bb9d8f"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," ",(0,s.jsxs)(r.strong,{children:["\u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"ResetOnlyOnce"})," \u5c5e\u6027\uff0c\u652f\u6301\u53ea\u8fd0\u884c\u4e00\u6b21\u7684\u4f5c\u4e1a\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u91cd\u590d\u6267\u884c"]})," ",(0,s.jsx)("sup",{children:"4.8.1.5"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.25"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/a8be728eac986ebc5f44718b08c67aaee8b89dc6",children:"a8be728"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u52a8\u6001\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u59d4\u6258\u652f\u6301 ",(0,s.jsx)("sup",{children:"4.8.1.8"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.27"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/e02266c44187dbc2b416abe1ca4112ce13c89180",children:"e02266c"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u7a81\u7834\u6027\u53d8\u5316"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u79fb\u9664"})," ",(0,s.jsxs)(r.strong,{children:["\u5b9a\u65f6\u4efb\u52a1\u770b\u677f ",(0,s.jsx)(r.code,{children:"SyncRate"})," \u914d\u7f6e\uff0c\u524d\u540e\u7aef\u91c7\u7528\u6700\u65b0\u7684 ",(0,s.jsx)(r.code,{children:"SSE"})," \u63a8\u9001\u6280\u672f\u66ff\u4ee3"]})," ",(0,s.jsx)("sup",{children:"4.8.8.29"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.06.25"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/e4c4cf1d418f3cc2291eca7d7dd1c8b62d17b0e9",children:"e4c4cf1"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u8c03\u6574"})," ",(0,s.jsxs)(r.strong,{children:["\u5b9a\u65f6\u4efb\u52a1\u52a8\u6001\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"DynamicJob"})," \u59d4\u6258/\u65b9\u6cd5\u7b7e\u540d"]})," ",(0,s.jsx)("sup",{children:"4.8.7.10"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.14"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/6d56b531f34c9d616202a6f53c31a10974065d56",children:"6d56b53"})]}),"\n"]}),"\n"]}),"\n"]}),(0,s.jsxs)(n,{style:{marginLeft:50},children:[(0,s.jsx)("summary",{children:"\u67e5\u770b\u53d8\u5316"}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(r.p,{children:["\u51cf\u5c11\u8bb0\u5fc6\u8d1f\u62c5\uff0c\u7edf\u4e00\u52a8\u6001\u4f5c\u4e1a\u548c\u666e\u901a\u4f5c\u4e1a\u7684 ",(0,s.jsx)(r.code,{children:"ExecuteAsync"})," \u65b9\u6cd5\u7b7e\u540d\uff0c\u6545\u505a\u51fa\u8c03\u6574\u3002"]}),(0,s.jsx)(r.p,{children:"\u7531\uff1a"}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3}",children:'options.AddJob((serviceProvider, context, stoppingToken) =>\r\n{\r\n serviceProvider.GetLogger().LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n}, Triggers.PeriodSeconds(5));\n'})}),(0,s.jsx)(r.p,{children:"\u8c03\u6574\u4e3a\uff1a"}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3}",children:'options.AddJob((context, stoppingToken) =>\r\n{\r\n context.ServiceProvider.GetLogger().LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n}, Triggers.PeriodSeconds(5));\n'})})]})]}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u8c03\u6574"})," ",(0,s.jsx)(r.strong,{children:"\u5b9a\u65f6\u4efb\u52a1\u5e95\u5c42\u6240\u6709\u4ee3\u7801\uff0c\u65e5\u5fd7\uff0c\u6ce8\u91ca\uff0c\u6587\u6863"})," ",(0,s.jsx)("sup",{children:"4.8.1.10"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.05"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u95ee\u9898\u4fee\u590d"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u8bbe\u7f6e\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Result"})," \u540e\u4f5c\u4e1a\u6267\u884c\u5f02\u5e38\u4e0d\u80fd\u91cd\u7f6e\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.9.1.7"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.11.24"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/147215f1631f58fca900f17cca5695f9431555e5",children:"147215f"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u9ad8\u9891\u4f5c\u4e1a\u4e0b\u6301\u4e45\u5316\u64cd\u4f5c\u51fa\u73b0\u963b\u585e\u5361\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.8.51"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.11.06"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/f1d0b4a9d7d65d5263109d5370b8d87705f4178b",children:"f1d0b4a"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u770b\u677f\u4e2d\u95f4\u4ef6 ",(0,s.jsx)(r.code,{children:"SSE"})," \u8bf7\u6c42\u4e0d\u662f\u957f\u8fde\u63a5\u5bfc\u81f4\u8fde\u63a5\u9891\u7e41\u521d\u59cb\u5316\u9500\u6bc1 ",(0,s.jsx)("sup",{children:"4.8.8.49"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.10.26"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/1997f1b99043eb80accac4e6a0c60c4e33d77183",children:"1997f1b"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u56e0\u4e0a\u4e00\u7248\u672c\u4fee\u6539 ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/4e2615b00da0b2db756e4084be882c0362c442f5",children:"4e2615b"})," \u5bfc\u81f4\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668\u5f02\u5e38\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.8.36"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.07.06"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I7J59D",children:"#I7J59D"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u56e0\u4e0a\u4e00\u7248\u672c\u4fee\u6539 ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/4e2615b00da0b2db756e4084be882c0362c442f5",children:"4e2615b"})," \u5bfc\u81f4 ",(0,s.jsx)(r.code,{children:"Cron"})," \u89e3\u6790\u5f02\u5e38\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.8.32"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.06.28"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I7GQ5I",children:"#I7GQ5I"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u8bbe\u7f6e\u989d\u5916\u6570\u636e\u4e0d\u652f\u6301 ",(0,s.jsx)(r.code,{children:"long/int64"})," \u7c7b\u578b\u53c2\u6570\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.8.31"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.06.28"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/4e2615b00da0b2db756e4084be882c0362c442f5",children:"4e2615b"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u4f11\u7720\u6beb\u79d2\u6570\u5927\u4e8e ",(0,s.jsx)(r.code,{children:"int.MaxValue"})," \u65f6\u51fa\u73b0 ",(0,s.jsx)(r.code,{children:"ArgumentOutOfRangeException"})," ",(0,s.jsx)("sup",{children:"4.8.8.27"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.06.21"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I7F6ZT",children:"#I7F6ZT"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u901a\u8fc7\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"Id"})," \u5220\u9664\u4f5c\u4e1a\u4e0d\u80fd\u5220\u9664\u4f5c\u4e1a\u89e6\u53d1\u5668\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.7.35"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.05"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/312ca357cca1e59e1b6cc67ec499bf512f79dd0a",children:"312ca35"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u4f5c\u4e1a\u72b6\u6001\u4e3a ",(0,s.jsx)(r.code,{children:"\u79ef\u538b:0"})," \u548c ",(0,s.jsx)(r.code,{children:"\u5f52\u6863:6"})," \u65f6\u8c03\u7528\u7acb\u5373\u6267\u884c\u540e\u4e0d\u80fd\u6062\u590d\u4e0a\u4e00\u6b21\u72b6\u6001 ",(0,s.jsx)("sup",{children:"4.8.7.18"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.21"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/6f5aae8dd1169b7111ff6801111691764b03ba29",children:"6f5aae8"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u66f4\u65b0\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"null"})," \u503c\u9ed8\u8ba4\u88ab\u8df3\u8fc7\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.7.17"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.20"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6OHO4",children:"#I6OHO4"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u751f\u6210 ",(0,s.jsx)(r.code,{children:"SQL"})," \u8bed\u53e5\u6ca1\u6709\u5904\u7406 ",(0,s.jsx)(r.code,{children:"'"})," \u8f6c\u4e49\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.7.15"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.19"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6NXKA",children:"#I6NXKA"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u670d\u52a1\u5728\u505c\u6b62\u8fdb\u7a0b\u65f6\u4f1a\u5361\u4f4f ",(0,s.jsx)(r.code,{children:"30\u79d2"})," \u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.7.8"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.13"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6MI9I",children:"#I6MI9I"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6MHOU",children:"#I6MHOU"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u770b\u677f\u5220\u9664\u4e0d\u5b58\u5728\u7684\u4f5c\u4e1a\u89e6\u53d1\u5668\u51fa\u73b0\u7a7a\u5f02\u5e38 ",(0,s.jsx)("sup",{children:"4.8.7.7"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.11"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/01d446620c20e373f198195797896d8c96feeb15",children:"01d4466"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"StartAll"})," \u51fa\u73b0\u4e2a\u522b\u4f5c\u4e1a\u663e\u793a ",(0,s.jsx)(r.code,{children:"\u65e0\u89e6\u53d1\u65f6\u95f4"})," \u7684\u72b6\u6001 ",(0,s.jsx)("sup",{children:"4.8.4.14"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.01.12"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6A08X",children:"#I6A08X"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u505c\u6b62\u4f5c\u4e1a\u89e6\u53d1\u5668\u540e\u8fd0\u884c\u8bb0\u5f55\u4e0d\u80fd\u5199\u5165\u6700\u65b0\u8bb0\u5f55\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.4.8"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.01.05"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/d4c553fb9b0037ab29942ccc2a25a386fc28c1db",children:"d4c553f"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u4f7f\u7528 ",(0,s.jsx)(r.code,{children:"Furion.Pure"})," \u5305\u8bbf\u95ee ",(0,s.jsx)(r.code,{children:"Dashboard"})," \u51fa\u73b0 ",(0,s.jsx)(r.code,{children:"404"})," \u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.4.2"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.01.02"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/21977b70ef84fd674bb306ab86ef032f7f28c7a7",children:"21977b7"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"scheduler.RemoveTrigger(triggerId)"})," \u62a5\u5f02\u5e38\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.3.3"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.09"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I65EQ1#note_15047484_link",children:"#I65EQ1"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u4f5c\u4e1a\u89e6\u53d1\u5668\u914d\u7f6e\u4e86 ",(0,s.jsx)(r.code,{children:"EndTime"})," \u548c ",(0,s.jsx)(r.code,{children:"StartTime"})," \u4e4b\u540e ",(0,s.jsx)(r.code,{children:"Status"})," \u6ca1\u6709\u5bf9\u5e94\u4e0a ",(0,s.jsx)("sup",{children:"4.8.3.1"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.09"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/52a5506c2fda7c31df01b2e90af7ad6b0c5f94aa",children:"52a5506"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"scheduler.AddTrigger(triggerBuilder)"})," \u65e0\u6548\u7684\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.3.1"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.09"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I65EQ1",children:"#I65EQ1"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u4f5c\u4e1a\u62e5\u6709\u591a\u4e2a\u89e6\u53d1\u5668\u65f6\u6682\u505c\u4f5c\u4e1a\u540e\u4f9d\u7136\u5b58\u5728\u4e2a\u522b\u672a\u6682\u505c\u7684\u6e05\u7a7a\uff08\u5e76\u53d1\u95ee\u9898\uff09 ",(0,s.jsx)("sup",{children:"4.8.2.12"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.07"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I655W9",children:"#I655W9"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u4f5c\u4e1a\u89e6\u53d1\u5668\u4e0d\u7b26\u5408\u4e0b\u4e00\u6b21\u6267\u884c\u89c4\u5f8b\u4f46 ",(0,s.jsx)(r.code,{children:"NextRunTime"})," \u4e0d\u4e3a ",(0,s.jsx)(r.code,{children:"null"})," \u60c5\u51b5 ",(0,s.jsx)("sup",{children:"4.8.1.5"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.25"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/a8be728eac986ebc5f44718b08c67aaee8b89dc6",children:"a8be728"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u8fd0\u884c\u65f6\u542f\u52a8/\u6682\u505c\u4f5c\u4e1a\u65e0\u6548\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.1.6"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.25"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6368M",children:"#I6368M"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u4fee\u590d"})," \u5b9a\u65f6\u4efb\u52a1\u751f\u6210\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u8bed\u53e5\u4e0d\u652f\u6301 ",(0,s.jsx)(r.code,{children:"MySQL"})," \u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.1.7"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.26"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I638ZC",children:"#I638ZC"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u5176\u4ed6\u66f4\u6539"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u8c03\u6574"})," \u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"GC"})," \u56de\u6536\u903b\u8f91\uff0c\u907f\u514d\u9ad8\u9891\u6dfb\u52a0\u4f5c\u4e1a\u5bfc\u81f4 ",(0,s.jsx)(r.code,{children:"\u5c3e\u5ef6\u8fdf"})," \u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.8.3"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.21"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6XIV8",children:"#I6XIV8"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u8c03\u6574"})," \u5b9a\u65f6\u4efb\u52a1\u65e5\u5fd7\u8bbe\u8ba1\uff0c\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u65e5\u5fd7\u8f93\u51fa ",(0,s.jsx)("sup",{children:"4.8.8.3"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.21"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6XI2L",children:"#I6XI2L"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u8c03\u6574"})," \u5b9a\u65f6\u4efb\u52a1\u52a8\u6001\u59d4\u6258\u4f5c\u4e1a\u6301\u4e45\u5316\u903b\u8f91\uff0c\u91c7\u7528\u4e0d\u89e6\u53d1\u6301\u4e45\u5316\u64cd\u4f5c ",(0,s.jsx)("sup",{children:"4.8.7.36"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.06"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/7bb58b64407f899d5f7f128da64fa972cf4df61b",children:"7bb58b6"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u8c03\u6574"})," \u5b9a\u65f6\u4efb\u52a1 ",(0,s.jsx)(r.code,{children:"Http"})," \u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"HttpMethod"})," \u5c5e\u6027\u62fc\u5199\u9519\u6210 ",(0,s.jsx)(r.code,{children:"HttpMedhod"})," ",(0,s.jsx)("sup",{children:"4.8.7.24"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.28"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/pulls/756",children:"!756"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u8c03\u6574"})," \u5b9a\u65f6\u4efb\u52a1\u914d\u7f6e\u9009\u9879 ",(0,s.jsx)(r.code,{children:"BuilSqlType"})," \u5c5e\u6027\u547d\u4e3a ",(0,s.jsx)(r.code,{children:"BuildSqlType"})," ",(0,s.jsx)("sup",{children:"4.8.7.11"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.15"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/92117b842f7f8bdeb983bf3dac510f713d8410c2",children:"92117b8"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u8c03\u6574"})," ",(0,s.jsxs)(r.strong,{children:["\u5b9a\u65f6\u4efb\u52a1\u67e5\u770b\u4f5c\u4e1a\u89e6\u53d1\u5668\u8fd0\u884c\u8bb0\u5f55\u7531\u4fdd\u5b58 ",(0,s.jsx)(r.code,{children:"10\u6761"})," \u6539\u4e3a ",(0,s.jsx)(r.code,{children:"5\u6761"})]})," ",(0,s.jsx)("sup",{children:"4.8.7.7"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.07"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/01d446620c20e373f198195797896d8c96feeb15",children:"01d4466"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u8c03\u6574"})," \u5b9a\u65f6\u4efb\u52a1\u8c03\u5ea6\u5668\u65f6\u95f4\u7cbe\u5ea6\uff0c\u63a7\u5236\u6301\u7eed\u6267\u884c\u4e00\u5e74\u8bef\u5dee\u5728 ",(0,s.jsx)(r.code,{children:"100ms"})," \u4ee5\u5185 ",(0,s.jsx)("sup",{children:"4.8.2.9"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.01"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/334d08989503bacd8bf2abb2cc87cf2031dc9da6",children:"334d089"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u8c03\u6574"})," \u5b9a\u65f6\u4efb\u52a1\u4f5c\u4e1a\u8ba1\u5212\u5de5\u5382 ",(0,s.jsx)(r.code,{children:"GetNextRunJobs()"})," \u65b9\u6cd5\u903b\u8f91 ",(0,s.jsx)("sup",{children:"4.8.2.7"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.30"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I63VS2",children:"#I63VS2"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u6587\u6863"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u4f5c\u4e1a\u6267\u884c\u5668\u5b9e\u73b0\u8d85\u65f6\u6587\u6863 ",(0,s.jsx)("sup",{children:"4.8.3.8"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.12.20"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"ResetOnlyOnce"})," \u6587\u6863 ",(0,s.jsx)("sup",{children:"4.8.1.5"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.25"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/a8be728eac986ebc5f44718b08c67aaee8b89dc6",children:"a8be728"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," ",(0,s.jsxs)(r.strong,{children:["\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"Roslyn"})," \u52a8\u6001\u7f16\u8bd1\u4ee3\u7801\u521b\u5efa ",(0,s.jsx)(r.code,{children:"IJob"})," \u7c7b\u578b\u6587\u6863"]})," ",(0,s.jsx)("sup",{children:"4.8.1.5"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.25"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/2c5e5befc7a335d6ef0e75eea0061aee1e4dd061",children:"2c5e5be"})]}),"\n",(0,s.jsxs)(r.li,{children:["\xa0",(0,s.jsx)(o.Z,{children:"\u65b0\u589e"})," \u81ea\u5b9a\u4e49 ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u548c ",(0,s.jsx)(r.code,{children:"Trigger"})," \u8f93\u51fa ",(0,s.jsx)(r.code,{children:"SQL"})," \u6587\u6863 ",(0,s.jsx)("sup",{children:"4.8.2"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2022.11.27"})," ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/commit/0bb9d8f1f3606af145b44c2984b87fdc020f02e1",children:"0bb9d8f"})]}),"\n"]}),"\n"]}),"\n"]})]})})]}),"\n",(0,s.jsx)(r.admonition,{title:"4.8.0 \u4ee5\u4e0b\u7248\u672c\u8bf4\u660e",type:"warning",children:(0,s.jsxs)(r.p,{children:[(0,s.jsxs)(r.strong,{children:["\u5728 ",(0,s.jsx)(r.code,{children:"Furion 4.8.0+"})," \u7248\u672c\u91c7\u7528 ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Sundial",children:"Sundial"})," \u5b9a\u65f6\u4efb\u52a1\u66ff\u6362\u539f\u6709\u7684 ",(0,s.jsx)(r.code,{children:"TaskScheduler"})]}),"\uff0c",(0,s.jsx)(r.a,{href:"/docs/job-old",children:"\u67e5\u770b\u65e7\u6587\u6863"})]})}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.0 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n","\n","\n",(0,s.jsx)(r.h2,{id:"2611-\u5173\u4e8e\u8c03\u5ea6\u4f5c\u4e1a",children:"26.1.1 \u5173\u4e8e\u8c03\u5ea6\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.p,{children:"\u8c03\u5ea6\u4f5c\u4e1a\u53c8\u79f0\u5b9a\u65f6\u4efb\u52a1\uff0c\u987e\u540d\u601d\u4e49\uff0c\u5b9a\u65f6\u4efb\u52a1\u5c31\u662f\u5728\u7279\u5b9a\u7684\u65f6\u95f4\u6216\u7b26\u5408\u67d0\u79cd\u65f6\u95f4\u89c4\u5f8b\u81ea\u52a8\u89e6\u53d1\u5e76\u6267\u884c\u4efb\u52a1\u3002"}),"\n",(0,s.jsx)("img",{src:(0,c.Z)("img/scdr.png")}),"\n",(0,s.jsx)(r.h3,{id:"26111-\u4f7f\u7528\u573a\u666f",children:"26.1.1.1 \u4f7f\u7528\u573a\u666f"}),"\n",(0,s.jsx)(r.p,{children:"\u5b9a\u65f6\u4efb\u52a1\u7684\u5e94\u7528\u573a\u666f\u975e\u5e38\u5e7f\uff0c\u51e0\u4e4e\u662f\u6bcf\u4e00\u4e2a\u8f6f\u4ef6\u7cfb\u7edf\u5fc5\u5907\u529f\u80fd\uff1a"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:"\u53eb\u4f60\u8d77\u5e8a\u7684\u95f9\u949f"}),"\n",(0,s.jsx)(r.li,{children:"\u65e5\u5386\u65e5\u7a0b\u63d0\u9192"}),"\n",(0,s.jsx)(r.li,{children:"\u751f\u65e5\u7eaa\u5ff5\u65e5\u63d0\u9192"}),"\n",(0,s.jsx)(r.li,{children:"\u5b9a\u65f6\u5907\u4efd\u6570\u636e\u5e93"}),"\n",(0,s.jsx)(r.li,{children:"\u5b9a\u65f6\u6e05\u7406\u5783\u573e\u6570\u636e"}),"\n",(0,s.jsx)(r.li,{children:"\u5b9a\u65f6\u53d1\u9001\u8425\u9500\u4fe1\u606f\uff0c\u90ae\u4ef6"}),"\n",(0,s.jsx)(r.li,{children:"\u5b9a\u65f6\u4e0a\u7ebf\u4ea7\u54c1\uff0c\u6bd4\u5982\u9884\u552e\u4ea7\u54c1\uff0c\u53cc\u5341\u4e00\u6d3b\u52a8"}),"\n",(0,s.jsx)(r.li,{children:"\u5b9a\u65f6\u53d1\u9001\u4f18\u60e0\u5238"}),"\n",(0,s.jsx)(r.li,{children:"\u5b9a\u65f6\u53d1\u5e03\uff0c\u5b9e\u73b0 Devops \u529f\u80fd\uff0c\u5982 Jenkins"}),"\n",(0,s.jsx)(r.li,{children:"\u5b9a\u65f6\u722c\u866b\u6293\u6570\u636e"}),"\n",(0,s.jsx)(r.li,{children:"\u5b9a\u65f6\u5bfc\u51fa\u62a5\u8868\uff0c\u5386\u53f2\u7edf\u8ba1\uff0c\u8003\u52e4\u7edf\u8ba1"}),"\n",(0,s.jsx)(r.li,{children:"..."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"2612-\u5feb\u901f\u5165\u95e8",children:"26.1.2 \u5feb\u901f\u5165\u95e8"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\u5b9a\u4e49\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f ",(0,s.jsx)(r.code,{children:"MyJob"}),"\uff1a"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,9,11}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsxs)(r.li,{children:["\u5728 ",(0,s.jsx)(r.code,{children:"Startup.cs"})," \u6ce8\u518c ",(0,s.jsx)(r.code,{children:"Schedule"})," \u670d\u52a1\uff1a"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3-4}",children:"services.AddSchedule(options =>\r\n{\r\n // \u6ce8\u518c\u4f5c\u4e1a\uff0c\u5e76\u914d\u7f6e\u4f5c\u4e1a\u89e6\u53d1\u5668\r\n options.AddJob<MyJob>(Triggers.Secondly()); // \u8868\u793a\u6bcf\u79d2\u6267\u884c\r\n});\n"})}),"\n",(0,s.jsxs)(r.ol,{start:"3",children:["\n",(0,s.jsx)(r.li,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c"}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {6,8,10,12,14,16,18}",children:"info: 2022-12-02 16:51:33.5032989 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-02 16:51:33.5180669 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-02 16:51:34.1452041 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-02 16:51:34.1541701 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-02 16:51:34.1748401 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-02 16:51:35.0712571 +08:00 \u661f\u671f\u4e94 L MyJob[0] #4\r\n <job1> [C] <job1 job1_trigger1> * * * * * * 1ts 2022-12-02 16:51:35.000 -> 2022-12-02 16:51:36.000\r\ninfo: 2022-12-02 16:51:36.0317375 +08:00 \u661f\u671f\u4e94 L MyJob[0] #14\r\n <job1> [C] <job1 job1_trigger1> * * * * * * 2ts 2022-12-02 16:51:36.000 -> 2022-12-02 16:51:37.000\r\ninfo: 2022-12-02 16:51:37.0125007 +08:00 \u661f\u671f\u4e94 L MyJob[0] #9\r\n <job1> [C] <job1 job1_trigger1> * * * * * * 3ts 2022-12-02 16:51:37.000 -> 2022-12-02 16:51:38.000\r\ninfo: 2022-12-02 16:51:38.0179920 +08:00 \u661f\u671f\u4e94 L MyJob[0] #8\r\n <job1> [C] <job1 job1_trigger1> * * * * * * 4ts 2022-12-02 16:51:38.000 -> 2022-12-02 16:51:39.000\n"})}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"JobExecutionContext"})," \u91cd\u5199\u4e86 ",(0,s.jsx)(r.code,{children:"ToString()"})," \u65b9\u6cd5\u5e76\u63d0\u4f9b\u4ee5\u4e0b\u51e0\u79cd\u683c\u5f0f\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {2,5}",children:"# \u6301\u7eed\u8fd0\u884c\u683c\u5f0f\r\n<\u4f5c\u4e1aId> \u4f5c\u4e1a\u63cf\u8ff0 [\u5e76\u884cC/\u4e32\u884cS] <\u4f5c\u4e1aId \u89e6\u53d1\u5668Id> \u89e6\u53d1\u5668\u5b57\u7b26\u4e32 \u89e6\u53d1\u5668\u63cf\u8ff0 \u89e6\u53d1\u6b21\u6570ts \u89e6\u53d1\u65f6\u95f4 -> \u4e0b\u4e00\u6b21\u89e6\u53d1\u65f6\u95f4\r\n\r\n# \u89e6\u53d1\u505c\u6b62\u683c\u5f0f\r\n<\u4f5c\u4e1aId> \u4f5c\u4e1a\u63cf\u8ff0 [\u5e76\u884cC/\u4e32\u884cS] <\u4f5c\u4e1aId \u89e6\u53d1\u5668Id> \u89e6\u53d1\u5668\u5b57\u7b26\u4e32 \u89e6\u53d1\u5668\u63cf\u8ff0 \u89e6\u53d1\u6b21\u6570ts \u89e6\u53d1\u65f6\u95f4 [\u89e6\u53d1\u5668\u7ec8\u6b62\u72b6\u6001]\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"26121-\u6307\u5b9a\u4f5c\u4e1a-id",children:["26.1.2.1 \u6307\u5b9a\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"Id"})]}),"\n",(0,s.jsxs)(r.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u4e0d\u6307\u5b9a\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"Id"})," \u4f1a\u81ea\u52a8\u751f\u6210 ",(0,s.jsx)(r.code,{children:"job[\u7f16\u53f7]"}),"\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:'services.AddSchedule(options =>\r\n{\r\n options.AddJob<MyJob>("myjob", Triggers.Secondly());\r\n});\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {6,8,12,14,16}",children:"info: 2022-12-02 17:15:43.3024818 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-02 17:15:43.3107918 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-02 17:15:43.9498664 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The <myjob_trigger1> trigger for scheduler of <myjob> successfully appended to the schedule.\r\ninfo: 2022-12-02 17:15:43.9532894 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <myjob> successfully appended to the schedule.\r\nwarn: 2022-12-02 17:15:43.9941565 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-02 17:15:44.1230353 +08:00 \u661f\u671f\u4e94 L MyJob[0] #6\r\n <myjob> [C] <myjob myjob_trigger1> * * * * * * 1ts 2022-12-02 17:15:44.000 -> 2022-12-02 17:15:45.000\r\ninfo: 2022-12-02 17:15:45.0854893 +08:00 \u661f\u671f\u4e94 L MyJob[0] #9\r\n <myjob> [C] <myjob myjob_trigger1> * * * * * * 2ts 2022-12-02 17:15:45.000 -> 2022-12-02 17:15:46.000\r\ninfo: 2022-12-02 17:15:46.0100813 +08:00 \u661f\u671f\u4e94 L MyJob[0] #13\r\n <myjob> [C] <myjob myjob_trigger1> * * * * * * 3ts 2022-12-02 17:15:46.000 -> 2022-12-02 17:15:47.000\n"})}),"\n",(0,s.jsx)(r.h3,{id:"26122-\u591a\u4e2a\u4f5c\u4e1a\u89e6\u53d1\u5668",children:"26.1.2.2 \u591a\u4e2a\u4f5c\u4e1a\u89e6\u53d1\u5668"}),"\n",(0,s.jsxs)(r.p,{children:["\u6709\u65f6\u5019\uff0c\u4e00\u4e2a\u4f5c\u4e1a\u652f\u6301\u591a\u79cd\u89e6\u53d1\u65f6\u95f4\uff0c\u6bd4\u5982 ",(0,s.jsx)(r.code,{children:"\u6bcf\u5206\u949f"})," \u6267\u884c\u4e00\u6b21\uff0c\u6bcf ",(0,s.jsx)(r.code,{children:"5\u79d2"})," \u6267\u884c\u4e00\u6b21\uff0c\u6bcf\u5206\u949f\u7b2c ",(0,s.jsx)(r.code,{children:"3/7/8\u79d2"})," \u6267\u884c\u4e00\u6b21\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3-5}",children:'services.AddSchedule(options =>\r\n{\r\n options.AddJob<MyJob>(Triggers.Minutely() // \u6bcf\u5206\u949f\u5f00\u59cb\r\n , Triggers.Period(5000) // \u6bcf 5 \u79d2\uff0c\u8fd8\u652f\u6301 Triggers.PeriodSeconds(5)\uff0cTriggers.PeriodMinutes(5)\uff0cTriggers.PeriodHours(5)\r\n , Triggers.Cron("3,7,8 * * * * ?", CronStringFormat.WithSeconds)); // \u6bcf\u5206\u949f\u7b2c 3/7/8 \u79d2\r\n});\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {6,8,10,12,16,18,20,24,26}",children:"info: 2022-12-02 17:18:53.3593518 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-02 17:18:53.3663583 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-02 17:18:54.0381456 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-02 17:18:54.0708796 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger2> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-02 17:18:54.0770193 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger3> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-02 17:18:54.0800017 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-02 17:18:54.1206816 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-02 17:18:59.0040452 +08:00 \u661f\u671f\u4e94 L MyJob[0] #9\r\n <job1> [C] <job1 job1_trigger2> 5000ms 1ts 2022-12-02 17:18:58.927 -> 2022-12-02 17:19:03.944\r\ninfo: 2022-12-02 17:19:00.0440142 +08:00 \u661f\u671f\u4e94 L MyJob[0] #15\r\n <job1> [C] <job1 job1_trigger1> * * * * * 1ts 2022-12-02 17:19:00.000 -> 2022-12-02 17:20:00.000\r\ninfo: 2022-12-02 17:19:03.0149075 +08:00 \u661f\u671f\u4e94 L MyJob[0] #6\r\n <job1> [C] <job1 job1_trigger3> 3,7,8 * * * * ? 1ts 2022-12-02 17:19:03.000 -> 2022-12-02 17:19:07.000\r\ninfo: 2022-12-02 17:19:03.9519350 +08:00 \u661f\u671f\u4e94 L MyJob[0] #15\r\n <job1> [C] <job1 job1_trigger2> 5000ms 2ts 2022-12-02 17:19:03.944 -> 2022-12-02 17:19:08.919\r\ninfo: 2022-12-02 17:19:07.0116797 +08:00 \u661f\u671f\u4e94 L MyJob[0] #4\r\n <job1> [C] <job1 job1_trigger3> 3,7,8 * * * * ? 2ts 2022-12-02 17:19:07.000 -> 2022-12-02 17:19:08.000\r\ninfo: 2022-12-02 17:19:08.0078132 +08:00 \u661f\u671f\u4e94 L MyJob[0] #15\r\n <job1> [C] <job1 job1_trigger3> 3,7,8 * * * * ? 3ts 2022-12-02 17:19:08.000 -> 2022-12-02 17:20:03.000\r\ninfo: 2022-12-02 17:19:08.9298393 +08:00 \u661f\u671f\u4e94 L MyJob[0] #14\r\n <job1> [C] <job1 job1_trigger2> 5000ms 3ts 2022-12-02 17:19:08.919 -> 2022-12-02 17:19:13.897\r\ninfo: 2022-12-02 17:19:13.9056247 +08:00 \u661f\u671f\u4e94 L MyJob[0] #8\r\n <job1> [C] <job1 job1_trigger2> 5000ms 4ts 2022-12-02 17:19:13.897 -> 2022-12-02 17:19:18.872\r\ninfo: 2022-12-02 17:19:18.8791123 +08:00 \u661f\u671f\u4e94 L MyJob[0] #12\r\n <job1> [C] <job1 job1_trigger2> 5000ms 5ts 2022-12-02 17:19:18.872 -> 2022-12-02 17:19:23.846\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"26123-\u4e32\u884c-\u6267\u884c",children:["26.1.2.3 ",(0,s.jsx)(r.code,{children:"\u4e32\u884c"})," \u6267\u884c"]}),"\n",(0,s.jsxs)(r.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u4f5c\u4e1a\u91c7\u7528 ",(0,s.jsx)(r.code,{children:"\u5e76\u884c"})," \u6267\u884c\u65b9\u5f0f\uff0c\u4e5f\u5c31\u662f\u4e0d\u4f1a\u7b49\u5f85\u4e0a\u4e00\u6b21\u4f5c\u4e1a\u6267\u884c\u5b8c\u6210\uff0c\u53ea\u8981\u89e6\u53d1\u65f6\u95f4\u5230\u4e86\u5c31\u81ea\u52a8\u6267\u884c\uff0c\u4f46\u4e00\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u7b49\u5f85\u4e0a\u4e00\u6b21\u4f5c\u4e1a\u5b8c\u6210\u518d\u6267\u884c\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:"services.AddSchedule(options =>\r\n{\r\n options.AddJob<MyJob>(concurrent: false, Triggers.Secondly()); // \u4e32\u884c\uff0c\u6bcf\u79d2\u6267\u884c\r\n});\n"})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {12}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context.JobId} {context.TriggerId} {context.OccurrenceTime} {context.Trigger}");\r\n await Task.Delay(2000, stoppingToken); // \u8fd9\u91cc\u6a21\u62df\u8017\u65f6\u64cd\u4f5c\uff0c\u6bd4\u5982\u8017\u65f62\u79d2\r\n }\r\n}\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {6,8,12,14,16,18,20}",children:"info: 2022-12-02 17:23:27.3726863 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-02 17:23:27.3830366 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-02 17:23:27.9083148 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-02 17:23:27.9184699 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-02 17:23:27.9740028 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-02 17:23:28.0638789 +08:00 \u661f\u671f\u4e94 L MyJob[0] #9\r\n <job1> [S] <job1 job1_trigger1> * * * * * * 1ts 2022-12-02 17:23:28.000 -> 2022-12-02 17:23:29.000\r\nwarn: 2022-12-02 17:23:29.1119269 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #9\r\n 12/02/2022 17:23:29: The <job1_trigger1> trigger of job <job1> failed to execute as scheduled due to blocking.\r\nwarn: 2022-12-02 17:23:30.0090551 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #9\r\n 12/02/2022 17:23:30: The <job1_trigger1> trigger of job <job1> failed to execute as scheduled due to blocking.\r\ninfo: 2022-12-02 17:23:31.0121694 +08:00 \u661f\u671f\u4e94 L MyJob[0] #9\r\n <job1> [S] <job1 job1_trigger1> * * * * * * 2ts 2022-12-02 17:23:31.000 -> 2022-12-02 17:23:32.000\r\nwarn: 2022-12-02 17:23:32.0243646 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #9\r\n 12/02/2022 17:23:32: The <job1_trigger1> trigger of job <job1> failed to execute as scheduled due to blocking.\n"})}),"\n",(0,s.jsxs)(r.admonition,{type:"caution",children:[(0,s.jsxs)(r.mdxAdmonitionTitle,{children:[(0,s.jsx)(r.code,{children:"\u4e32\u884c"})," \u6267\u884c\u89c4\u5219\u8bf4\u660e"]}),(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"\u4e32\u884c"})," \u6267\u884c\u5982\u679c\u9047\u5230\u4e0a\u4e00\u6b21\u4f5c\u4e1a\u8fd8\u672a\u5b8c\u6210\u90a3\u4e48\u5b83\u4f1a\u7b49\u5230\u4e0b\u4e00\u6b21\u89e6\u53d1\u65f6\u95f4\u5230\u4e86\u518d\u6267\u884c\uff0c\u4ee5\u6b64\u91cd\u590d\u3002"]})]}),"\n",(0,s.jsxs)(r.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 ",(0,s.jsx)(r.code,{children:"\u4e32\u884c"})," \u6267\u884c\u4f46\u56e0\u4e3a\u8017\u65f6\u5bfc\u81f4",(0,s.jsx)(r.strong,{children:"\u89e6\u53d1\u65f6\u95f4\u5230\u4e86\u4f46\u5b9e\u9645\u672a\u80fd\u6267\u884c"}),"\u4f1a\u9ed8\u8ba4\u8f93\u51fa ",(0,s.jsx)(r.code,{children:"warn"})," \u8b66\u544a\u65e5\u5fd7\uff0c\u5982\u9700\u5173\u95ed\u53ea\u9700\u8981\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:"services.AddSchedule(options =>\r\n{\r\n options.LogEnabled = false;\r\n options.AddJob<MyJob>(concurrent: false, Triggers.Secondly()); // \u6bcf\u79d2\u6267\u884c\r\n});\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {2,4,6,8,10}",children:"info: 2022-12-02 17:27:13.1136450 +08:00 \u661f\u671f\u4e94 L MyJob[0] #12\r\n <job1> [S] <job1 job1_trigger1> * * * * * * 1ts 2022-12-02 17:27:13.000 -> 2022-12-02 17:27:14.000\r\ninfo: 2022-12-02 17:27:16.0092433 +08:00 \u661f\u671f\u4e94 L MyJob[0] #8\r\n <job1> [S] <job1 job1_trigger1> * * * * * * 2ts 2022-12-02 17:27:16.000 -> 2022-12-02 17:27:17.000\r\ninfo: 2022-12-02 17:27:19.0092363 +08:00 \u661f\u671f\u4e94 L MyJob[0] #6\r\n <job1> [S] <job1 job1_trigger1> * * * * * * 3ts 2022-12-02 17:27:19.000 -> 2022-12-02 17:27:20.000\r\ninfo: 2022-12-02 17:27:22.0183594 +08:00 \u661f\u671f\u4e94 L MyJob[0] #9\r\n <job1> [S] <job1 job1_trigger1> * * * * * * 4ts 2022-12-02 17:27:22.000 -> 2022-12-02 17:27:23.000\r\ninfo: 2022-12-02 17:27:25.0152323 +08:00 \u661f\u671f\u4e94 L MyJob[0] #4\r\n <job1> [S] <job1 job1_trigger1> * * * * * * 5ts 2022-12-02 17:27:25.000 -> 2022-12-02 17:27:26.000\n"})}),"\n",(0,s.jsx)(r.h3,{id:"26124-\u6253\u5370\u4f5c\u4e1a\u5b8c\u6574\u4fe1\u606f",children:"26.1.2.4 \u6253\u5370\u4f5c\u4e1a\u5b8c\u6574\u4fe1\u606f"}),"\n",(0,s.jsx)(r.p,{children:"\u6846\u67b6\u63d0\u4f9b\u4e86\u56db\u79cd\u65b9\u5f0f\u6253\u5370\u4f5c\u4e1a\u5b8c\u6574\u4fe1\u606f\u3002"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u7b2c\u4e00\u79cd\uff1a\u8f93\u51fa\u5b8c\u6574\u7684\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"JSON"})," \u4fe1\u606f\uff1a",(0,s.jsx)(r.code,{children:"context.ConvertToJSON()"})]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {11}",children:"public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation(context.ConvertToJSON());\r\n await Task.CompletedTask;\r\n }\r\n}\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6253\u5370\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",metastring:"showLineNumbers {3,14}",children:'info: 2022-12-02 18:00:59.4140802 +08:00 \u661f\u671f\u4e94 L MyJob[0] #13\r\n {\r\n "jobDetail": {\r\n "jobId": "job1",\r\n "groupName": null,\r\n "jobType": "MyJob",\r\n "assemblyName": "ConsoleApp32",\r\n "description": null,\r\n "concurrent": true,\r\n "includeAnnotations": false,\r\n "properties": "{}",\r\n "updatedTime": "2022-12-02 18:00:59.390"\r\n },\r\n "trigger": {\r\n "triggerId": "job1_trigger1",\r\n "jobId": "job1",\r\n "triggerType": "Furion.Schedule.PeriodSecondsTrigger",\r\n "assemblyName": "Furion",\r\n "args": "[5]",\r\n "description": null,\r\n "status": 2,\r\n "startTime": null,\r\n "endTime": null,\r\n "lastRunTime": "2022-12-02 18:00:59.326",\r\n "nextRunTime": "2022-12-02 18:01:04.358",\r\n "numberOfRuns": 1,\r\n "maxNumberOfRuns": 0,\r\n "numberOfErrors": 0,\r\n "maxNumberOfErrors": 0,\r\n "numRetries": 0,\r\n "retryTimeout": 1000,\r\n "startNow": true,\r\n "runOnStart": false,\r\n "resetOnlyOnce": true,\r\n "result": null,\r\n "elapsedTime": 100,\r\n "updatedTime": "2022-12-02 18:00:59.390"\r\n }\r\n }\n'})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u7b2c\u4e8c\u79cd\uff1a\u8f93\u51fa\u5355\u72ec\u7684\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"JSON"})," \u4fe1\u606f\uff1a",(0,s.jsx)(r.code,{children:"jobDetail.ConvertToJSON()"})," \u6216 ",(0,s.jsx)(r.code,{children:"trigger.ConvertToJSON()"})]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {11-12}",children:"public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation(context.JobDetail.ConvertToJSON());\r\n _logger.LogInformation(context.Trigger.ConvertToJSON(NamingConventions.UnderScoreCase)); // \u652f\u6301\u4e09\u79cd\u5c5e\u6027\u540d\u8f93\u51fa\u89c4\u5219\r\n\r\n await Task.CompletedTask;\r\n }\r\n}\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6253\u5370\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",metastring:"showLineNumbers {2-12,14-37}",children:'info: 2022-12-02 18:02:10.7923360 +08:00 \u661f\u671f\u4e94 L MyJob[0] #8\r\n {\r\n "jobId": "job1",\r\n "groupName": null,\r\n "jobType": "MyJob",\r\n "assemblyName": "ConsoleApp32",\r\n "description": null,\r\n "concurrent": true,\r\n "includeAnnotations": false,\r\n "properties": "{}",\r\n "updatedTime": "2022-12-02 18:02:10.774"\r\n }\r\ninfo: 2022-12-02 18:02:10.8008708 +08:00 \u661f\u671f\u4e94 L MyJob[0] #8\r\n {\r\n "trigger_id": "job1_trigger1",\r\n "job_id": "job1",\r\n "trigger_type": "Furion.Schedule.PeriodSecondsTrigger",\r\n "assembly_name": "Furion",\r\n "args": "[5]",\r\n "description": null,\r\n "status": 2,\r\n "start_time": null,\r\n "end_time": null,\r\n "last_run_time": "2022-12-02 18:02:10.727",\r\n "next_run_time": "2022-12-02 18:02:15.733",\r\n "number_of_runs": 1,\r\n "max_number_of_runs": 0,\r\n "number_of_errors": 0,\r\n "max_number_of_errors": 0,\r\n "num_retries": 0,\r\n "retry_timeout": 1000,\r\n "start_now": true,\r\n "run_on_start": false,\r\n "reset_only_once": true,\r\n "result": null,\r\n "elapsed_time": 100,\r\n "updated_time": "2022-12-02 18:02:10.774"\r\n }\n'})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u7b2c\u4e09\u79cd\uff1a\u8f93\u51fa\u5355\u72ec\u7684\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"SQL"})," \u4fe1\u606f\uff1a",(0,s.jsx)(r.code,{children:"jobDetail.ConvertToSQL()"})," \u6216 ",(0,s.jsx)(r.code,{children:"trigger.ConvertToSQL()"})]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {11-12,14-16}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n var jobDetail = context.JobDetail;\r\n var trigger = context.Trigger;\r\n\r\n _logger.LogInformation(jobDetail.ConvertToSQL("\u4f5c\u4e1a\u4fe1\u606f\u8868\u540d", PersistenceBehavior.Appended)); // \u8f93\u51fa\u65b0\u589e\u8bed\u53e5\r\n _logger.LogInformation(trigger.ConvertToSQL("\u4f5c\u4e1a\u89e6\u53d1\u5668\u8868\u540d", PersistenceBehavior.Removed, NamingConventions.Pascal)); // \u8f93\u51fa\u5220\u9664\u8bed\u53e5\r\n _logger.LogInformation(trigger.ConvertToSQL("\u4f5c\u4e1a\u89e6\u53d1\u5668\u8868\u540d", PersistenceBehavior.Updated, NamingConventions.UnderScoreCase)); // \u8f93\u51fa\u66f4\u65b0\u8bed\u53e5\r\n\r\n await Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6253\u5370\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sql",metastring:"showLineNumbers {2,25,28}",children:"info: 2022-12-02 18:03:11.8543760 +08:00 \u661f\u671f\u4e94 L MyJob[0] #13\r\n INSERT INTO \u4f5c\u4e1a\u4fe1\u606f\u8868\u540d(\r\n jobId,\r\n groupName,\r\n jobType,\r\n assemblyName,\r\n description,\r\n concurrent,\r\n includeAnnotations,\r\n properties,\r\n updatedTime\r\n )\r\n VALUES(\r\n 'job1',\r\n NULL,\r\n 'MyJob',\r\n 'ConsoleApp32',\r\n NULL,\r\n 1,\r\n 0,\r\n '{}',\r\n '2022-12-02 18:03:11.836'\r\n );\r\ninfo: 2022-12-02 18:03:11.8636268 +08:00 \u661f\u671f\u4e94 L MyJob[0] #13\r\n DELETE FROM \u4f5c\u4e1a\u89e6\u53d1\u5668\u8868\u540d\r\n WHERE TriggerId = 'job1_trigger1' AND JobId = 'job1';\r\ninfo: 2022-12-02 18:03:11.8669134 +08:00 \u661f\u671f\u4e94 L MyJob[0] #13\r\n UPDATE \u4f5c\u4e1a\u89e6\u53d1\u5668\u8868\u540d\r\n SET\r\n trigger_id = 'job1_trigger1',\r\n job_id = 'job1',\r\n trigger_type = 'Furion.Schedule.PeriodSecondsTrigger',\r\n assembly_name = 'Furion',\r\n args = '[5]',\r\n description = NULL,\r\n status = 2,\r\n start_time = NULL,\r\n end_time = NULL,\r\n last_run_time = '2022-12-02 18:03:11.778',\r\n next_run_time = '2022-12-02 18:03:16.794',\r\n number_of_runs = 1,\r\n max_number_of_runs = 0,\r\n number_of_errors = 0,\r\n max_number_of_errors = 0,\r\n num_retries = 0,\r\n retry_timeout = 1000,\r\n start_now = 1,\r\n run_on_start = 0,\r\n reset_only_once = 1,\r\n result = NULL,\r\n elapsed_time = 100,\r\n updated_time = '2022-12-02 18:03:11.836'\r\n WHERE trigger_id = 'job1_trigger1' AND job_id = 'job1';\n"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u7b2c\u56db\u79cd\uff1a\u8f93\u51fa\u5355\u72ec\u7684\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"Monitor"})," \u4fe1\u606f\uff1a",(0,s.jsx)(r.code,{children:"jobDetail.ConvertToMonitor()"})," \u6216 ",(0,s.jsx)(r.code,{children:"trigger.ConvertToMonitor()"})]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {11-12}",children:"public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation(context.JobDetail.ConvertToMonitor());\r\n _logger.LogInformation(context.Trigger.ConvertToMonitor());\r\n\r\n await Task.CompletedTask;\r\n }\r\n}\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6253\u5370\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {2,16}",children:"info: 2022-12-02 18:04:06.2833095 +08:00 \u661f\u671f\u4e94 L MyJob[0] #8\r\n \u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 JobDetail \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\r\n \u2523 MyJob\r\n \u2523\r\n \u2523 jobId\uff1a job1\r\n \u2523 groupName\uff1a\r\n \u2523 jobType\uff1a MyJob\r\n \u2523 assemblyName\uff1a ConsoleApp32\r\n \u2523 description\uff1a\r\n \u2523 concurrent\uff1a True\r\n \u2523 includeAnnotations\uff1a False\r\n \u2523 properties\uff1a {}\r\n \u2523 updatedTime\uff1a 2022-12-02 18:04:06.254\r\n \u2517\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 JobDetail \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\r\ninfo: 2022-12-02 18:04:06.2868205 +08:00 \u661f\u671f\u4e94 L MyJob[0] #8\r\n \u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 Trigger \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\r\n \u2523 Furion.Schedule.PeriodSecondsTrigger\r\n \u2523\r\n \u2523 triggerId\uff1a job1_trigger1\r\n \u2523 jobId\uff1a job1\r\n \u2523 triggerType\uff1a Furion.Schedule.PeriodSecondsTrigger\r\n \u2523 assemblyName\uff1a Furion\r\n \u2523 args\uff1a [5]\r\n \u2523 description\uff1a\r\n \u2523 status\uff1a Running\r\n \u2523 startTime\uff1a\r\n \u2523 endTime\uff1a\r\n \u2523 lastRunTime\uff1a 2022-12-02 18:04:06.189\r\n \u2523 nextRunTime\uff1a 2022-12-02 18:04:11.212\r\n \u2523 numberOfRuns\uff1a 1\r\n \u2523 maxNumberOfRuns\uff1a 0\r\n \u2523 numberOfErrors\uff1a 0\r\n \u2523 maxNumberOfErrors\uff1a 0\r\n \u2523 numRetries\uff1a 0\r\n \u2523 retryTimeout\uff1a 1000\r\n \u2523 startNow\uff1a True\r\n \u2523 runOnStart\uff1a False\r\n \u2523 resetOnlyOnce\uff1a True\r\n \u2523 result\uff1a\r\n \u2523 elapsedTime\uff1a 100\r\n \u2523 updatedTime\uff1a 2022-12-02 18:04:06.254\r\n \u2517\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 Trigger \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n"})}),"\n",(0,s.jsx)(r.h3,{id:"26125-\u8fd0\u884c\u65f6\u52a8\u6001\u64cd\u4f5c\u4f5c\u4e1a",children:"26.1.2.5 \u8fd0\u884c\u65f6\uff08\u52a8\u6001\uff09\u64cd\u4f5c\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.p,{children:"\u6709\u65f6\u5019\uff0c\u6211\u4eec\u9700\u8981\u5728\u8fd0\u884c\u65f6\u5bf9\u4f5c\u4e1a\u52a8\u6001\u7684\u589e\u52a0\uff0c\u66f4\u65b0\uff0c\u5220\u9664\u7b49\u64cd\u4f5c\uff0c\u5982\u52a8\u6001\u6dfb\u52a0\u4f5c\u4e1a\uff1a"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\u6ce8\u518c ",(0,s.jsx)(r.code,{children:"services.AddSchedule()"})," \u670d\u52a1"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,5}",children:"// \u53ef\u4ee5\u5b8c\u5168\u52a8\u6001\u64cd\u4f5c\uff0c\u53ea\u9700\u8981\u6ce8\u518c\u670d\u52a1\u5373\u53ef\r\nservices.AddSchedule();\r\n\r\n// \u4e5f\u53ef\u4ee5\u90e8\u5206\u9759\u6001\uff0c\u90e8\u5206\u52a8\u6001\u6ce8\u518c\r\nservices.AddSchedule(options =>\r\n{\r\n options.AddJob<MyJob>(concurrent: false, Triggers.PeriodSeconds(5));\r\n});\n"})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsxs)(r.li,{children:["\u6ce8\u5165 ",(0,s.jsx)(r.code,{children:"ISchedulerFactory"})," \u670d\u52a1"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4,11}",children:'public class YourService: IYourService\r\n{\r\n private readonly ISchedulerFactory _schedulerFactory;\r\n public YourService(ISchedulerFactory schedulerFactory)\r\n {\r\n _schedulerFactory = schedulerFactory;\r\n }\r\n\r\n public void AddJob()\r\n {\r\n _schedulerFactory.AddJob<MyJob>("\u52a8\u6001\u4f5c\u4e1a Id", Triggers.Secondly());\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"3",children:["\n",(0,s.jsx)(r.li,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c"}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {6,8,12,14,16,18,22,24}",children:"info: 2022-12-02 18:07:33.7799062 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-02 18:07:33.7971487 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-02 18:07:33.8751390 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-02 18:07:33.8805159 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-02 18:07:33.9013656 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-02 18:07:38.9241031 +08:00 \u661f\u671f\u4e94 L MyJob[0] #9\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-02 18:07:38.813 -> 2022-12-02 18:07:43.863\r\ninfo: 2022-12-02 18:07:43.0865787 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #16\r\n The <\u52a8\u6001\u4f5c\u4e1a Id_trigger1> trigger for scheduler of <\u52a8\u6001\u4f5c\u4e1a Id> successfully appended to the schedule.\r\nwarn: 2022-12-02 18:07:43.0894163 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #16\r\n Schedule hosted service cancels hibernation and GC.Collect().\r\ninfo: 2022-12-02 18:07:43.1129824 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #16\r\n The scheduler of <\u52a8\u6001\u4f5c\u4e1a Id> successfully appended to the schedule.\r\ninfo: 2022-12-02 18:07:43.8810686 +08:00 \u661f\u671f\u4e94 L MyJob[0] #17\r\n <job1> [C] <job1 job1_trigger1> 5s 2ts 2022-12-02 18:07:43.863 -> 2022-12-02 18:07:48.848\r\ninfo: 2022-12-02 18:07:44.0104025 +08:00 \u661f\u671f\u4e94 L MyJob[0] #16\r\n <\u52a8\u6001\u4f5c\u4e1a Id> [C] <\u52a8\u6001\u4f5c\u4e1a Id \u52a8\u6001\u4f5c\u4e1a Id_trigger1> * * * * * * 1ts 2022-12-02 18:07:44.000 -> 2022-12-02 18:07:45.000\r\ninfo: 2022-12-02 18:07:45.0092441 +08:00 \u661f\u671f\u4e94 L MyJob[0] #8\r\n <\u52a8\u6001\u4f5c\u4e1a Id> [C] <\u52a8\u6001\u4f5c\u4e1a Id \u52a8\u6001\u4f5c\u4e1a Id_trigger1> * * * * * * 2ts 2022-12-02 18:07:45.000 -> 2022-12-02 18:07:46.000\n"})}),"\n",(0,s.jsx)(r.h3,{id:"26126-\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027",children:"26.1.2.6 \u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"}),"\n",(0,s.jsxs)(r.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6846\u67b6\u4e0d\u4f1a\u626b\u63cf ",(0,s.jsx)(r.code,{children:"IJob"})," \u5b9e\u73b0\u7c7b\u7684\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027\uff0c\u4f46\u53ef\u4ee5\u8bbe\u7f6e\u4f5c\u4e1a\u7684 ",(0,s.jsx)(r.code,{children:"IncludeAnnotations"})," \u8fdb\u884c\u542f\u7528\u3002"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\u542f\u7528 ",(0,s.jsx)(r.code,{children:"IncludeAnnotations"})," \u626b\u63cf"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3,7,10}",children:"services.AddSchedule(options =>\r\n{\r\n options.AddJob(JobBuilder.Create<MyJob>().SetIncludeAnnotations(true)\r\n , Triggers.PeriodSeconds(5)); // \u8fd9\u91cc\u53ef\u4f20\u53ef\u4e0d\u4f20\uff0c\u4f20\u4e86\u5219\u4f1a\u81ea\u52a8\u8f7d\u5165\u7279\u6027\u548c\u8fd9\u91cc\u914d\u7f6e\u7684\u4f5c\u4e1a\u89e6\u53d1\u5668\r\n\r\n // \u8fd8\u53ef\u4ee5\u66f4\u7b80\u5355~~\r\n options.AddJob(typeof(MyJob).ScanToBuilder());\r\n\r\n // \u8fd8\u53ef\u4ee5\u6279\u91cf\u65b0\u589e Furion 4.8.2.4+\r\n options.AddJob(App.EffectiveTypes.ScanToBuilders());\r\n});\n"})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsxs)(r.li,{children:["\u5728 ",(0,s.jsx)(r.code,{children:"MyJob"})," \u4e2d\u6dfb\u52a0\u591a\u4e2a\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1-2}",children:'[Minutely]\r\n[Cron("3,7,8 * * * * ?", CronStringFormat.WithSeconds)]\r\npublic class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context}");\r\n await Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"3",children:["\n",(0,s.jsx)(r.li,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c"}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {6,8,10,12,16,18,20,24,26}",children:"info: 2022-12-02 18:12:56.4199663 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-02 18:12:56.4287962 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-02 18:12:56.6149505 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-02 18:12:56.6205117 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger2> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-02 18:12:56.6266132 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger3> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-02 18:12:56.6291006 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-02 18:12:56.6454334 +08:00 \u661f\u671f\u4e94 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-02 18:13:00.0842828 +08:00 \u661f\u671f\u4e94 L MyJob[0] #15\r\n <job1> [C] <job1 job1_trigger2> * * * * * 1ts 2022-12-02 18:13:00.000 -> 2022-12-02 18:14:00.000\r\ninfo: 2022-12-02 18:13:01.5260220 +08:00 \u661f\u671f\u4e94 L MyJob[0] #16\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-02 18:13:01.494 -> 2022-12-02 18:13:06.492\r\ninfo: 2022-12-02 18:13:03.0076111 +08:00 \u661f\u671f\u4e94 L MyJob[0] #6\r\n <job1> [C] <job1 job1_trigger3> 3,7,8 * * * * ? 1ts 2022-12-02 18:13:03.000 -> 2022-12-02 18:13:07.000\r\ninfo: 2022-12-02 18:13:06.4954400 +08:00 \u661f\u671f\u4e94 L MyJob[0] #13\r\n <job1> [C] <job1 job1_trigger1> 5s 2ts 2022-12-02 18:13:06.492 -> 2022-12-02 18:13:11.463\r\ninfo: 2022-12-02 18:13:07.0180453 +08:00 \u661f\u671f\u4e94 L MyJob[0] #6\r\n <job1> [C] <job1 job1_trigger3> 3,7,8 * * * * ? 2ts 2022-12-02 18:13:07.000 -> 2022-12-02 18:13:08.000\r\ninfo: 2022-12-02 18:13:08.0114292 +08:00 \u661f\u671f\u4e94 L MyJob[0] #13\r\n <job1> [C] <job1 job1_trigger3> 3,7,8 * * * * ? 3ts 2022-12-02 18:13:08.000 -> 2022-12-02 18:14:03.000\r\ninfo: 2022-12-02 18:13:11.4774564 +08:00 \u661f\u671f\u4e94 L MyJob[0] #16\r\n <job1> [C] <job1 job1_trigger1> 5s 3ts 2022-12-02 18:13:11.463 -> 2022-12-02 18:13:16.445\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"26127-http-\u8bf7\u6c42\u4f5c\u4e1a",children:["26.1.2.7 ",(0,s.jsx)(r.code,{children:"HTTP"})," \u8bf7\u6c42\u4f5c\u4e1a"]}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.7.7 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"HTTP"})," \u8bf7\u6c42\u4f5c\u4e1a\u901a\u5e38\u7528\u4e8e\u5b9a\u65f6\u8bf7\u6c42/\u8bbf\u95ee\u4e92\u8054\u7f51\u5730\u5740\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:'services.AddSchedule(options =>\r\n{\r\n options.AddHttpJob(request =>\r\n {\r\n request.RequestUri = "https://www.chinadot.net";\r\n request.HttpMethod = HttpMethod.Get;\r\n // request.Body = "{}"; // \u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u4f53\r\n // request.Headers.Add("framework", "Furion"); // Furion 4.8.8.46+ \u652f\u6301\r\n // request.GroupName = "group"; // Furion 4.8.8.46+ \u652f\u6301\r\n // request.Description = "\u4f5c\u4e1a\u8bf7\u6c42\u63cf\u8ff0"; // Furion 4.8.8.46+ \u652f\u6301\r\n }, Triggers.PeriodSeconds(5));\r\n});\n'})}),"\n",(0,s.jsxs)(r.admonition,{type:"important",children:[(0,s.jsxs)(r.mdxAdmonitionTitle,{children:[(0,s.jsx)(r.code,{children:"System.Net.Http.IHttpClientFactory"})," \u9519\u8bef"]}),(0,s.jsxs)(r.p,{children:["\u5982\u9047 ",(0,s.jsx)(r.code,{children:"Unable to resolve service for type 'System.Net.Http.IHttpClientFactory' while attempting to activate 'Furion.Schedule.HttpJob'."})," \u9519\u8bef\uff0c\u8bf7\u5148\u6ce8\u518c ",(0,s.jsx)(r.code,{children:"servces.AddHttpClient()"})," \u670d\u52a1\u3002"]})]}),"\n",(0,s.jsx)(r.p,{children:"\u4f5c\u4e1a\u6267\u884c\u65e5\u5fd7\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {13-26}",children:"info: 2023-03-11 11:05:36.3616747 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2023-03-11 11:05:36.3652411 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2023-03-11 11:05:36.5172940 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2023-03-11 11:05:36.5189296 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2023-03-11 11:05:36.5347816 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\nwarn: 2023-03-11 11:05:41.5228138 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #15\r\n Schedule hosted service will sleep <4970> milliseconds and be waked up at <2023-03-11 11:05:46.486>.\r\ninfo: 2023-03-11 11:05:41.5542865 +08:00 \u661f\u671f\u516d L System.Net.Http.HttpClient.HttpJob.LogicalHandler[100] #9\r\n Start processing HTTP request GET https://www.chinadot.net/\r\ninfo: 2023-03-11 11:05:41.5589056 +08:00 \u661f\u671f\u516d L System.Net.Http.HttpClient.HttpJob.ClientHandler[100] #9\r\n Sending HTTP request GET https://www.chinadot.net/\r\ninfo: 2023-03-11 11:05:44.1305461 +08:00 \u661f\u671f\u516d L System.Net.Http.HttpClient.HttpJob.ClientHandler[101] #8\r\n Received HTTP response headers after 2566.7836ms - 200\r\ninfo: 2023-03-11 11:05:44.1343977 +08:00 \u661f\u671f\u516d L System.Net.Http.HttpClient.HttpJob.LogicalHandler[101] #8\r\n End processing HTTP request after 2584.2327ms - 200\r\ninfo: 2023-03-11 11:05:48.6475959 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #4\r\n Received HTTP response body with a length of <63639> output as follows - 200\r\n <!DOCTYPE html><html><head>\r\n <title>dotNET China | \u8ba9 .NET \u5f00\u53d1\u66f4\u7b80\u5355\uff0c\u66f4\u901a\u7528\uff0c\u66f4\u6d41\u884c</title>\r\n ......\r\n </body></html>\n"})}),"\n",(0,s.jsx)(r.h3,{id:"26128-\u59d4\u6258\u65b9\u5f0f\u4f5c\u4e1a",children:"26.1.2.8 \u59d4\u6258\u65b9\u5f0f\u4f5c\u4e1a"}),"\n",(0,s.jsxs)(r.p,{children:["\u6709\u65f6\u6211\u4eec\u9700\u8981\u5feb\u901f\u5f00\u542f\u65b0\u7684\u5b9a\u65f6\u4f5c\u4e1a",(0,s.jsx)(r.strong,{children:"\u4f46\u4e0d\u8003\u8651\u540e\u7eed\u6301\u4e45\u5316\u5b58\u50a8\uff08\u5982\u6570\u636e\u5e93\u5b58\u50a8\uff09"}),"\uff0c\u8fd9\u65f6\u53ef\u4ee5\u4f7f\u7528\u59d4\u6258\u4f5c\u4e1a\u65b9\u5f0f\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3-7}",children:'services.AddSchedule(options =>\r\n{\r\n // \u548c IJob \u7684 ExecuteAsync \u65b9\u6cd5\u7b7e\u540d\u4e00\u81f4\r\n options.AddJob((context, stoppingToken) =>\r\n {\r\n // \u53ef\u901a\u8fc7 context.ServiceProvider \u89e3\u6790\u670d\u52a1\uff1b\u6846\u67b6\u63d0\u4f9b\u4e86 .GetLogger() \u62d3\u5c55\u65b9\u6cd5\u8f93\u51fa\u65e5\u5fd7\r\n context.ServiceProvider.GetLogger().LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n }, Triggers.PeriodSeconds(5));\r\n});\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u4f5c\u4e1a\u6267\u884c\u65e5\u5fd7\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {6,8,12,14}",children:"info: 2023-03-21 14:22:34.1910781 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2023-03-21 14:22:34.1967420 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2023-03-21 14:22:34.6163320 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2023-03-21 14:22:34.6195112 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2023-03-21 14:22:34.6398162 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2023-03-21 14:22:39.7171392 +08:00 \u661f\u671f\u4e8c L System.Logging.DynamicJob[0] #9\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2023-03-21 14:22:39.575 -> 2023-03-21 14:22:44.623\r\ninfo: 2023-03-21 14:22:44.6986483 +08:00 \u661f\u671f\u4e8c L System.Logging.DynamicJob[0] #9\r\n <job1> [C] <job1 job1_trigger1> 5s 2ts 2023-03-21 14:22:44.623 -> 2023-03-21 14:22:49.657\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"26129-\u975e-iocdi-\u9879\u76ee\u4e2d\u4f7f\u7528",children:["26.1.2.9 \u975e ",(0,s.jsx)(r.code,{children:"IOC/DI"})," \u9879\u76ee\u4e2d\u4f7f\u7528"]}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.8.5 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u5728\u4e00\u4e9b\u4e0d\u652f\u6301\u4f9d\u8d56\u6ce8\u5165\u7684\u9879\u76ee\u7c7b\u578b\u5982 ",(0,s.jsx)(r.code,{children:"Console\u3001WinForm\u3001WPF"})," \u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u4f7f\u7528\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:"\u65b9\u5f0f\u4e00\uff1a\u65e0\u9700\u83b7\u53d6\u5176\u4ed6\u670d\u52a1\u5bf9\u8c61"}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,2,6-7}",children:"_ = new ServiceCollection()\r\n .AddSchedule(options =>\r\n {\r\n options.AddJob<MyJob>(Triggers.Period(5000));\r\n })\r\n .GetScheduleHostedService()\r\n .StartAsync(new CancellationTokenSource().Token);\n"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:"\u65b9\u5f0f\u4e8c\uff1a\u9700\u8981\u540e\u7eed\u89e3\u6790\u670d\u52a1"}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,7,10-11,14}",children:"// \u6ce8\u518c\u670d\u52a1\u5e76\u6784\u5efa\r\nIServiceProvider services = new ServiceCollection()\r\n .AddSchedule(options =>\r\n {\r\n options.AddJob<MyJob>(Triggers.Period(5000));\r\n })\r\n .BuildServiceProvider();\r\n\r\n// \u542f\u52a8\u4f5c\u4e1a\u8c03\u5ea6\u4e3b\u673a\u670d\u52a1\r\nservices.GetScheduleHostedService()\r\n .StartAsync(new CancellationTokenSource().Token);\r\n\r\n// \u89e3\u6790\u4f5c\u4e1a\u8ba1\u5212\u5de5\u5382\r\nvar schedulerFactory = services.GetService<ISchedulerFactory>();\n"})}),"\n",(0,s.jsxs)(r.admonition,{title:"\u5c0f\u77e5\u8bc6",type:"tip",children:[(0,s.jsxs)(r.p,{children:["\u53ea\u9700\u8981\u5c06 ",(0,s.jsx)(r.code,{children:"services"})," \u5bf9\u8c61\u7528\u7c7b\u7684\u9759\u6001\u5c5e\u6027\u5b58\u50a8\u8d77\u6765\u5373\u53ef\uff0c\u5982\uff1a"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:"public class DI\r\n{\r\n public static IServiceProvider Services {get; set;}\r\n}\n"})}),(0,s.jsxs)(r.p,{children:["\u4e4b\u540e\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"DI.Services = services;"})," \u5373\u53ef\uff0c\u540e\u7eed\u4fbf\u53ef\u4ee5\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"DI.Services.GetService<T>()"})," \u89e3\u6790\u670d\u52a1\u3002"]})]}),"\n",(0,s.jsxs)(r.h2,{id:"2613-\u4f5c\u4e1a\u4fe1\u606f-jobdetail-\u53ca\u6784\u5efa\u5668",children:["26.1.3 \u4f5c\u4e1a\u4fe1\u606f ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u53ca\u6784\u5efa\u5668"]}),"\n",(0,s.jsx)(r.h3,{id:"26131-\u5173\u4e8e\u4f5c\u4e1a\u4fe1\u606f",children:"26.1.3.1 \u5173\u4e8e\u4f5c\u4e1a\u4fe1\u606f"}),"\n",(0,s.jsxs)(r.p,{children:["\u6846\u67b6\u63d0\u4f9b\u4e86 ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u7c7b\u578b\u6765\u63cf\u8ff0\u4f5c\u4e1a\u4fe1\u606f\uff0c",(0,s.jsx)(r.code,{children:"JobDetail"})," \u7c7b\u578b\u63d0\u4f9b\u4ee5\u4e0b",(0,s.jsx)(r.strong,{children:"\u53ea\u8bfb\u5c5e\u6027"}),"\uff1a"]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"\u5c5e\u6027\u540d"}),(0,s.jsx)(r.th,{children:"\u5c5e\u6027\u7c7b\u578b"}),(0,s.jsx)(r.th,{children:"\u9ed8\u8ba4\u503c"}),(0,s.jsx)(r.th,{children:"\u8bf4\u660e"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"JobId"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsxs)(r.td,{children:["\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"Id"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"GroupName"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsx)(r.td,{children:"\u4f5c\u4e1a\u7ec4\u540d\u79f0"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"JobType"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsxs)(r.td,{children:["\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u7c7b\u578b\uff0c\u5b58\u50a8\u7684\u662f\u7c7b\u578b\u7684 ",(0,s.jsx)(r.code,{children:"FullName"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"AssemblyName"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsxs)(r.td,{children:["\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u7c7b\u578b\u6240\u5728\u7a0b\u5e8f\u96c6\uff0c\u5b58\u50a8\u7684\u662f\u7a0b\u5e8f\u96c6 ",(0,s.jsx)(r.code,{children:"Name"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Description"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsx)(r.td,{children:"\u63cf\u8ff0\u4fe1\u606f"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Concurrent"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"bool"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"true"})}),(0,s.jsxs)(r.td,{children:["\u4f5c\u4e1a\u6267\u884c\u65b9\u5f0f\uff0c\u5982\u679c\u8bbe\u7f6e\u4e3a ",(0,s.jsx)(r.code,{children:"false"}),"\uff0c\u90a3\u4e48\u4f7f\u7528 ",(0,s.jsx)(r.code,{children:"\u4e32\u884c"})," \u6267\u884c\uff0c\u5426\u5219 ",(0,s.jsx)(r.code,{children:"\u5e76\u884c"})," \u6267\u884c"]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"IncludeAnnotations"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"bool"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"false"})}),(0,s.jsxs)(r.td,{children:["\u662f\u5426\u626b\u63cf ",(0,s.jsx)(r.code,{children:"IJob"})," \u5b9e\u73b0\u7c7b ",(0,s.jsx)(r.code,{children:"[Trigger]"})," \u7279\u6027\u89e6\u53d1\u5668"]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Properties"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:'"{}"'})}),(0,s.jsxs)(r.td,{children:["\u4f5c\u4e1a\u4fe1\u606f\u989d\u5916\u6570\u636e\uff0c\u7531 ",(0,s.jsx)(r.code,{children:"Dictionary<string, object>"})," \u5e8f\u5217\u5316\u6210\u5b57\u7b26\u4e32\u5b58\u50a8"]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"UpdatedTime"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"DateTime?"})}),(0,s.jsx)(r.td,{}),(0,s.jsx)(r.td,{children:"\u4f5c\u4e1a\u66f4\u65b0\u65f6\u95f4"})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"26132-\u5173\u4e8e\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668",children:"26.1.3.2 \u5173\u4e8e\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668"}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u4fe1\u606f ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u662f\u4f5c\u4e1a\u8c03\u5ea6\u6a21\u5757\u63d0\u4f9b\u8fd0\u884c\u65f6\u7684",(0,s.jsx)(r.strong,{children:"\u53ea\u8bfb\u7c7b\u578b"}),"\uff0c\u90a3\u4e48\u6211\u4eec\u8be5\u5982\u4f55\u521b\u5efa\u6216\u53d8\u66f4 ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u5bf9\u8c61\u5462\uff1f"]}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"JobBuilder"})," \u662f\u4f5c\u4e1a\u8c03\u5ea6\u6a21\u5757\u63d0\u4f9b\u53ef\u7528\u6765\u751f\u6210\u8fd0\u884c\u65f6 ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u7684\u7c7b\u578b\uff0c\u8fd9\u6837\u505a\u7684\u597d\u5904\u53ef\u907f\u514d\u5916\u90e8\u76f4\u63a5\u4fee\u6539\u8fd0\u884c\u65f6 ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u6570\u636e\uff0c\u8fd8\u80fd\u5b9e\u73b0\u4efb\u4f55\u4fee\u6539\u52a8\u4f5c\u76d1\u542c\uff0c\u4e5f\u80fd\u907f\u514d\u591a\u7ebf\u7a0b\u62a2\u5360\u60c5\u51b5\u3002"]}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u8c03\u5ea6\u6a21\u5757\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u5f0f\u7528\u6765\u521b\u5efa ",(0,s.jsx)(r.code,{children:"JobBuilder"})," \u5bf9\u8c61\u3002"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"Create"})," \u9759\u6001\u65b9\u6cd5\u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,5,8,11,14}",children:'// \u6839\u636e\u4f5c\u4e1a Id \u521b\u5efa\r\nvar jobBuilder = JobBuilder.Create("job1");\r\n\r\n// \u6839\u636e IJob \u5b9e\u73b0\u7c7b\u7c7b\u578b\u521b\u5efa\r\nvar jobBuilder = JobBuilder.Create<MyJob>();\r\n\r\n// \u6839\u636e\u7a0b\u5e8f\u96c6\u540d\u79f0\u548c\u7c7b\u578b\u5b8c\u5168\u9650\u5b9a\u540d\uff08FullName\uff09\u521b\u5efa\r\nvar jobBuilder = JobBuilder.Create("YourProject", "YourProject.MyJob");\r\n\r\n// \u6839\u636e Type \u7c7b\u578b\u521b\u5efa\r\nvar jobBuilder = JobBuilder.Create(typeof(MyJob));\r\n\r\n// \u901a\u8fc7\u59d4\u6258\u521b\u5efa\u52a8\u6001\u4f5c\u4e1a\r\nvar jobBuilder = JobBuilder.Create((context, stoppingToken) =>\r\n{\r\n context.ServiceProvider.GetLogger().LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n});\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u7c7b\u578b\u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsx)(r.p,{children:"\u8fd9\u79cd\u65b9\u5f0f\u5e38\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u66f4\u65b0\u4f5c\u4e1a\u4fe1\u606f\u3002"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var jobBuilder = JobBuilder.From(jobDetail);\r\n\r\n//\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\r\nvar jobBuilder = jobDetail.GetBuilder();\n"})}),"\n",(0,s.jsxs)(r.ol,{start:"3",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32\u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["\u8be5\u65b9\u5f0f\u975e\u5e38\u7075\u6d3b\uff0c\u53ef\u4ece\u914d\u7f6e\u6587\u4ef6\uff0c",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32\uff0c\u6216\u5176\u4ed6\u80fd\u591f\u8fd4\u56de ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32\u7684\u5730\u65b9\u521b\u5efa\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2-12}",children:'var jobBuilder = JobBuilder.From(@"{\r\n\t""jobId"": ""job1"",\r\n\t""groupName"": null,\r\n\t""jobType"": ""MyJob"",\r\n\t""assemblyName"": ""ConsoleApp13"",\r\n\t""description"": null,\r\n\t""concurrent"": true,\r\n\t""includeAnnotations"": false,\r\n\t""properties"": ""{}"",\r\n\t""updatedTime"": null\r\n}");\n'})}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u679c\u4f7f\u7528\u7684\u662f ",(0,s.jsx)(r.code,{children:".NET7"}),"\uff0c\u53ef\u4f7f\u7528 ",(0,s.jsx)(r.code,{children:'"""'})," \u907f\u514d\u8f6c\u4e49\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2-12}",children:'var jobBuilder = JobBuilder.From("""\r\n{\r\n\t"jobId": "job1",\r\n\t"groupName": null,\r\n\t"jobType": "MyJob",\r\n\t"assemblyName": "ConsoleApp13",\r\n\t"description": null,\r\n\t"concurrent": true,\r\n\t"includeAnnotations": false,\r\n\t"properties": "{}",\r\n\t"updatedTime": "2022-12-02 18:00:59.390"\r\n}\r\n""");\n'})}),"\n",(0,s.jsxs)(r.admonition,{title:"\u5173\u4e8e\u5c5e\u6027\u540d\u5339\u914d\u89c4\u5219",type:"important",children:[(0,s.jsxs)(r.p,{children:["\u652f\u6301 ",(0,s.jsx)(r.code,{children:"CamelCase\uff08\u9a7c\u5cf0\u547d\u540d\u6cd5\uff09"}),"\uff0c",(0,s.jsx)(r.code,{children:"Pascal\uff08\u5e15\u65af\u5361\u547d\u540d\u6cd5\uff09"})," \u547d\u540d\u65b9\u5f0f\u3002"]}),(0,s.jsxs)(r.p,{children:[(0,s.jsxs)(r.strong,{children:["\u4e0d\u652f\u6301 ",(0,s.jsx)(r.code,{children:"UnderScoreCase\uff08\u4e0b\u5212\u7ebf\u547d\u540d\u6cd5\uff09"})]})," \uff0c\u5982 ",(0,s.jsx)(r.code,{children:'"include_annotations": true'})]})]}),"\n",(0,s.jsxs)(r.ol,{start:"4",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8fd8\u53ef\u4ee5\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"Clone"})," \u9759\u6001\u65b9\u6cd5\u4ece\u4e00\u4e2a ",(0,s.jsx)(r.code,{children:"JobBuilder"})," \u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var jobBuilder = JobBuilder.Clone(fromJobBuilder);\n"})}),"\n",(0,s.jsxs)(r.admonition,{title:"\u514b\u9686\u8bf4\u660e",type:"important",children:[(0,s.jsxs)(r.p,{children:["\u514b\u9686\u64cd\u4f5c\u53ea\u4f1a\u514b\u9686 ",(0,s.jsx)(r.code,{children:"AssemblyName"}),"\uff0c",(0,s.jsx)(r.code,{children:"JobType"}),"\uff0c",(0,s.jsx)(r.code,{children:"GroupName"}),"\uff0c",(0,s.jsx)(r.code,{children:"Description"}),"\uff0c",(0,s.jsx)(r.code,{children:"Concurrent"}),"\uff0c",(0,s.jsx)(r.code,{children:"IncludeAnnotations"}),"\uff0c",(0,s.jsx)(r.code,{children:"Properties"}),"\uff0c",(0,s.jsx)(r.code,{children:"DynamicExecuteAsync"}),"\uff08\u52a8\u6001\u4f5c\u4e1a\uff09\u3002"]}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u4e0d\u4f1a\u514b\u9686 ",(0,s.jsx)(r.code,{children:"JobId"}),"\uff0c",(0,s.jsx)(r.code,{children:"UpdatedTime"}),"\u3002"]})}),"\n"]})]}),"\n",(0,s.jsxs)(r.ol,{start:"5",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8fd8\u53ef\u4ee5\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"LoadFrom"})," \u5b9e\u4f8b\u65b9\u6cd5\u586b\u5145\u5f53\u524d\u7684 ",(0,s.jsx)(r.code,{children:"JobBuilder"})]})}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["\u6bd4\u5982\u53ef\u4ee5\u4f20\u9012\u533f\u540d\u7c7b\u578b\uff0c\u7c7b\u7c7b\u578b\uff0c\u5b57\u5178 ",(0,s.jsx)(r.code,{children:"Dictionary<string, object>"})," \u7c7b\u578b\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,9,14,17,22,25}",children:'// \u4f1a\u8986\u76d6\u6240\u6709\u76f8\u540c\u7684\u503c\r\njobBuilder.LoadFrom(new\r\n{\r\n Description = "\u6211\u662f\u63cf\u8ff0",\r\n Concurrent = false\r\n});\r\n\r\n// \u652f\u6301\u591a\u4e2a\u586b\u5145\uff0c\u8fd8\u53ef\u4ee5\u914d\u7f6e\u8df3\u8fc7 null \u503c\u8986\u76d6\r\njobBuilder.LoadFrom(new\r\n{\r\n Description = "\u6211\u662f\u53e6\u5916\u4e00\u4e2a\u63cf\u8ff0",\r\n Concurrent = false,\r\n IncludeAnnotations = default(object) // \u4f1a\u8df3\u8fc7\u8d4b\u503c\r\n}, ignoreNullValue: true);\r\n\r\n// \u652f\u6301\u5ffd\u7565\u7279\u5b9a\u5c5e\u6027\u540d\u6620\u5c04\r\njobBuilder.LoadFrom(new\r\n{\r\n Description = "\u6211\u662f\u53e6\u5916\u4e00\u4e2a\u63cf\u8ff0",\r\n Concurrent = false,\r\n IncludeAnnotations = default(object) // \u4f1a\u8df3\u8fc7\u8d4b\u503c\r\n}, ignorePropertyNames: new[]{ "description" });\r\n\r\n// \u652f\u6301\u5b57\u5178\u7c7b\u578b\r\njobBuilder.LoadFrom(new Dictionary<string, object>\r\n{\r\n {"Description", "\u8fd9\u662f\u65b0\u7684\u63cf\u8ff0" },\r\n {"include_annotations", false },\r\n {"updatedTime", DateTime.Now }\r\n});\n'})}),"\n",(0,s.jsx)(r.admonition,{title:"\u5173\u4e8e\u5c5e\u6027\u540d\u5339\u914d\u89c4\u5219",type:"important",children:(0,s.jsxs)(r.p,{children:["\u652f\u6301 ",(0,s.jsx)(r.code,{children:"CamelCase\uff08\u9a7c\u5cf0\u547d\u540d\u6cd5\uff09"}),"\uff0c",(0,s.jsx)(r.code,{children:"Pascal\uff08\u5e15\u65af\u5361\u547d\u540d\u6cd5\uff09"})," \u548c ",(0,s.jsx)(r.code,{children:"UnderScoreCase\uff08\u4e0b\u5212\u7ebf\u547d\u540d\u6cd5\uff09"})," \u547d\u540d\u65b9\u5f0f\u3002"]})}),"\n",(0,s.jsx)(r.h3,{id:"26133-\u8bbe\u7f6e\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668",children:"26.1.3.3 \u8bbe\u7f6e\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"JobBuilder"})," \u63d0\u4f9b\u4e86\u548c ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u5b8c\u5168\u5339\u914d\u7684 ",(0,s.jsx)(r.code,{children:"Set[\u5c5e\u6027\u540d]"})," \u65b9\u6cd5\u6765\u914d\u7f6e\u4f5c\u4e1a\u4fe1\u606f\u5404\u4e2a\u5c5e\u6027\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3,20}",children:'services.AddSchedule(options =>\r\n{\r\n var jobBuilder = JobBuilder.Create<MyJob>()\r\n .SetJobId("job1") // \u4f5c\u4e1a Id\r\n .SetGroupName("group1") // \u4f5c\u4e1a\u7ec4\u540d\u79f0\r\n .SetJobType("Furion.Application", "Furion.Application.MyJob") // \u4f5c\u4e1a\u7c7b\u578b\uff0c\u652f\u6301\u591a\u4e2a\u91cd\u8f7d\r\n .SetJobType<MyJob>() // \u4f5c\u4e1a\u7c7b\u578b\uff0c\u652f\u6301\u591a\u4e2a\u91cd\u8f7d\r\n .SetJobType(typeof(MyJob)) // \u4f5c\u4e1a\u7c7b\u578b\uff0c\u652f\u6301\u591a\u4e2a\u91cd\u8f7d\r\n .SetDescription("\u8fd9\u662f\u4e00\u6bb5\u63cf\u8ff0") // \u4f5c\u4e1a\u63cf\u8ff0\r\n .SetConcurrent(false) // \u5e76\u884c\u8fd8\u662f\u4e32\u884c\u65b9\u5f0f\uff0cfalse \u4e3a \u4e32\u884c\r\n .SetIncludeAnnotations(true) // \u662f\u5426\u626b\u63cf IJob \u7c7b\u578b\u7684\u89e6\u53d1\u5668\u7279\u6027\uff0ctrue \u4e3a \u626b\u63cf\r\n .SetProperties("{}") // \u4f5c\u4e1a\u989d\u5916\u6570\u636e Dictionary<string, object> \u7c7b\u578b\u5e8f\u5217\u5316\uff0c\u652f\u6301\u591a\u4e2a\u91cd\u8f7d\r\n .SetProperties(new Dictionary<string, object> { { "name", "Furion" } }) // \u4f5c\u4e1a\u7c7b\u578b\u989d\u5916\u6570\u636e\uff0c\u652f\u6301\u591a\u4e2a\u91cd\u8f7d\uff0c\u63a8\u8350\uff01\uff01\uff01\r\n .SetDynamicExecuteAsync((context, stoppingToken) => {\r\n context.ServiceProvider.GetLogger().LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n }) // \u52a8\u6001\u59d4\u6258\u5904\u7406\u7a0b\u5e8f\uff0c\u4e00\u65e6\u8bbe\u7f6e\u4e86\u6b64\u59d4\u6258\uff0c\u90a3\u4e48\u4f18\u5148\u7ea7\u5c06\u5927\u4e8e MyJob \u7684 ExecuteAsync\r\n ;\r\n\r\n options.AddJob(jobBuilder, Triggers.PeriodSeconds(5));\r\n});\n'})}),"\n",(0,s.jsx)(r.h3,{id:"26134-\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668\u989d\u5916\u6570\u636e",children:"26.1.3.4 \u4f5c\u4e1a\u4fe1\u606f/\u6784\u5efa\u5668\u989d\u5916\u6570\u636e"}),"\n",(0,s.jsxs)(r.p,{children:["\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u5728\u4f5c\u4e1a\u8fd0\u884c\u7684\u65f6\u5019\u6dfb\u52a0\u4e00\u4e9b\u989d\u5916\u6570\u636e\uff0c\u6216\u8005\u5b9e\u73b0\u591a\u4e2a\u89e6\u53d1\u5668\u5171\u4eab\u6570\u636e\uff0c\u7ecf\u5e38\u7528\u4e8e ",(0,s.jsx)(r.code,{children:"\u4e32\u884c"})," \u6267\u884c\u4e2d\uff08",(0,s.jsx)(r.code,{children:"\u5e76\u884c"})," \u4e5f\u540c\u6837\u5de5\u4f5c\uff09\uff0c\u540e\u9762\u4e00\u4e2a\u89e6\u53d1\u5668\u9700\u7b49\u5f85\u524d\u4e00\u4e2a\u89e6\u53d1\u5668\u5b8c\u6210\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {13-14,16}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n var jobDetail = context.JobDetail;\r\n\r\n var count = jobDetail.GetProperty<int>("count");\r\n jobDetail.AddOrUpdateProperty("count", count + 1); // \u9012\u589e count\r\n\r\n _logger.LogInformation($"count: {count} {context}");\r\n\r\n await Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u8fd0\u884c\u65e5\u5fd7\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {12,14,16,18}",children:"info: 2022-12-03 23:16:46.5150228 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-03 23:16:46.5197497 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-03 23:16:46.6987703 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-03 23:16:46.7003295 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-03 23:16:46.7248216 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-03 23:16:51.7013640 +08:00 \u661f\u671f\u516d L MyJob[0] #8\r\n count: 0 <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-03 23:16:51.663 -> 2022-12-03 23:16:56.656\r\ninfo: 2022-12-03 23:16:56.6768044 +08:00 \u661f\u671f\u516d L MyJob[0] #9\r\n count: 1 <job1> [C] <job1 job1_trigger1> 5s 2ts 2022-12-03 23:16:56.656 -> 2022-12-03 23:17:01.635\r\ninfo: 2022-12-03 23:17:01.6454604 +08:00 \u661f\u671f\u516d L MyJob[0] #8\r\n count: 2 <job1> [C] <job1 job1_trigger1> 5s 3ts 2022-12-03 23:17:01.635 -> 2022-12-03 23:17:06.608\r\ninfo: 2022-12-03 23:17:06.6247917 +08:00 \u661f\u671f\u516d L MyJob[0] #6\r\n count: 3 <job1> [C] <job1 job1_trigger1> 5s 4ts 2022-12-03 23:17:06.608 -> 2022-12-03 23:17:11.586\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u8c03\u5ea6\u6a21\u5757\u4e3a ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u548c ",(0,s.jsx)(r.code,{children:"JobBuilder"})," \u63d0\u4f9b\u4e86\u591a\u4e2a\u65b9\u6cd5\u64cd\u4f5c\u989d\u5916\u6570\u636e\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,5,8,11,14,17,20,23}",children:'// \u67e5\u770b\u6240\u6709\u989d\u5916\u6570\u636e\r\nvar properties = jobDetail.GetProperties();\r\n\r\n// \u67e5\u770b\u5355\u4e2a\u989d\u5916\u6570\u636e\uff0c\u8fd4\u56de object\r\nvar value = jobBuilder.GetProperty("key");\r\n\r\n// \u67e5\u770b\u5355\u4e2a\u989d\u5916\u6570\u636e\u6cdb\u578b\r\nvar value = jobDetail.GetProperty<int>("key");\r\n\r\n// \u6dfb\u52a0\u65b0\u7684\u989d\u5916\u6570\u636e\uff0c\u652f\u6301\u94fe\u5f0f\u64cd\u4f5c\uff0c\u5982\u679c\u952e\u5df2\u5b58\u5728\uff0c\u5219\u8df3\u8fc7\r\njobDetail.AddProperty("key", "Furion").AddProperty("key1", 2);\r\n\r\n// \u6dfb\u52a0\u6216\u66f4\u65b0\u989d\u5916\u6570\u636e\uff0c\u652f\u6301\u94fe\u5f0f\u64cd\u4f5c\uff0c\u4e0d\u5b58\u5728\u5219\u65b0\u589e\uff0c\u5b58\u5728\u5219\u66ff\u6362\uff0c\u63a8\u8350\r\njobDetail.AddOrUpdateProperty("key", "Furion").AddOrUpdateProperty("key1", 2);\r\n\r\n// \u8fd8\u53ef\u4ee5\u901a\u8fc7\u59d4\u6258\u7684\u65b9\u5f0f\uff1a\u5982\u679c\u952e\u4e0d\u5b58\u5728\u5219\u63d2\u5165 count = newValue\uff0c\u5426\u5219\u66f4\u65b0\u4e3a value\uff08\u65e7\u503c\uff09+1\r\njobDetail.AddOrUpdateProperty("count", newValue, value => value + 1);\r\n\r\n// \u5220\u9664\u67d0\u4e2a\u989d\u5916\u6570\u636e\uff0c\u652f\u6301\u94fe\u5f0f\u64cd\u4f5c\uff0c\u5982\u679c key \u4e0d\u5b58\u5728\u5219\u8df3\u8fc7\r\njobDetail.RemoveProperty("key").RemoveProperty("key1");\r\n\r\n// \u6e05\u7a7a\u6240\u6709\u989d\u5916\u6570\u636e\r\njobDetail.ClearProperties();\n'})}),"\n",(0,s.jsx)(r.admonition,{title:"\u4f5c\u4e1a\u989d\u5916\u6570\u636e\u7c7b\u578b\u652f\u6301",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u989d\u5916\u6570\u636e\u6bcf\u4e00\u9879\u7684\u503c\u53ea\u652f\u6301 ",(0,s.jsx)(r.code,{children:"int32"}),"\uff0c",(0,s.jsx)(r.code,{children:"int64"}),"\uff0c",(0,s.jsx)(r.code,{children:"string"}),"\uff0c",(0,s.jsx)(r.code,{children:"bool"}),"\uff0c",(0,s.jsx)(r.code,{children:"null"})," \u6216\u5b83\u4eec\u7ec4\u6210\u7684\u6570\u7ec4\u7c7b\u578b\u3002"]})}),"\n",(0,s.jsx)(r.h3,{id:"26135-\u4f5c\u4e1a\u4fe1\u606f\u7279\u6027",children:"26.1.3.5 \u4f5c\u4e1a\u4fe1\u606f\u7279\u6027"}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u4fe1\u606f\u7279\u6027 ",(0,s.jsx)(r.code,{children:"[JobDetail]"})," \u662f\u4e3a\u4e86\u65b9\u4fbf\u8fd0\u884c\u65f6\u6216\u542f\u52a8\u65f6\u5feb\u901f\u521b\u5efa\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u800c\u63d0\u4f9b\u7684\uff0c\u53ef\u5728\u542f\u52a8\u65f6\u6216\u8fd0\u884c\u65f6\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u521b\u5efa\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1}",children:'[JobDetail("job1", "\u8fd9\u662f\u4e00\u6bb5\u63cf\u8ff0")]\r\n[PeriodSeconds(5, TriggerId = "trigger1")]\r\npublic class MyJob : IJob\r\n{\r\n}\n'})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u542f\u52a8 ",(0,s.jsx)(r.code,{children:"IncludeAnnotations"})," \u5c5e\u6027\u81ea\u52a8\u586b\u5145"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4}",children:"services.AddSchedule(options =>\r\n{\r\n options.AddJob(JobBuilder.Create<MyJob>()\r\n .SetIncludeAnnotations(true)); // \u6b64\u65f6 [JobDetail] \u914d\u7f6e\u7684\u975e\u7a7a\u5c5e\u6027\u5c06\u81ea\u52a8\u590d\u5236\u7ed9 JobBuilder\uff0c[PeriodSeconds] \u4e5f\u4f1a\u81ea\u52a8\u521b\u5efa TriggerBuilder\r\n});\n"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.strong,{children:"\u624b\u52a8\u626b\u63cf\u5e76\u521b\u5efa\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668"})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var schedulerBuilder = typeof(MyJob).ScanToBuilder();\n"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.strong,{children:"\u901a\u8fc7\u7a0b\u5e8f\u96c6\u7c7b\u578b\u626b\u63cf\u6279\u91cf\u521b\u5efa\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668"})}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["\u4e5f\u53ef\u4ee5\u7528\u4e8e\u4f5c\u4e1a\u6301\u4e45\u5316 ",(0,s.jsx)(r.code,{children:"Preload"})," \u521d\u59cb\u5316\u65f6\u4f7f\u7528\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,4-5,8}",children:"public IEnumerable<SchedulerBuilder> Preload()\r\n{\r\n // \u626b\u63cf\u6240\u6709\u7c7b\u578b\u5e76\u521b\u5efa\r\n return App.EffectiveTypes.Where(t => t.IsJobType())\r\n .Select(t => t.ScanToBuilder());\r\n\r\n // \u8fd8\u53ef\u4ee5\u66f4\u7b80\u5355~~\r\n return App.EffectiveTypes.ScanToBuilders();\r\n}\n"})}),"\n",(0,s.jsx)(r.hr,{}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"\u4f5c\u4e1a\u4fe1\u606f\u7279\u6027\u8fd8\u63d0\u4f9b\u4e86\u591a\u4e2a\u5c5e\u6027\u914d\u7f6e"}),"\uff0c\u5982\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"JobId"}),"\uff1a\u4f5c\u4e1a\u4fe1\u606f Id\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"GroupName"}),"\uff1a\u4f5c\u4e1a\u7ec4\u540d\u79f0\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Description"}),"\uff1a\u63cf\u8ff0\u4fe1\u606f\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Concurrent"}),"\uff1a\u662f\u5426\u91c7\u7528\u5e76\u884c\u6267\u884c\uff0c",(0,s.jsx)(r.code,{children:"bool"})," \u7c7b\u578b\uff0c\u5982\u679c\u8bbe\u7f6e\u4e3a ",(0,s.jsx)(r.code,{children:"false"}),"\uff0c\u90a3\u4e48\u4f7f\u7528 ",(0,s.jsx)(r.code,{children:"\u4e32\u884c"})," \u6267\u884c"]}),"\n"]}),"\n",(0,s.jsx)(r.p,{children:"\u4f7f\u7528\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1-6}",children:'[JobDetail("jobId")] // \u4ec5\u4f5c\u4e1a Id\r\n[JobDetail("jobId", "\u8fd9\u662f\u4e00\u6bb5\u63cf\u8ff0")] // \u63cf\u8ff0\r\n[JobDetail("jobId", false)] // \u4e32\u884c\r\n[JobDetail("jobId", false, "\u8fd9\u662f\u4e00\u6bb5\u63cf\u8ff0")] // \u4e32\u884c + \u63cf\u8ff0\r\n[JobDetail("jobId", Concurrent = false, Description = "\u8fd9\u662f\u4e00\u6bb5\u63cf\u8ff0")]\r\n[JobDetail("jobId", Concurrent = false, Description = "\u8fd9\u662f\u4e00\u6bb5\u63cf\u8ff0", GroupName = "\u5206\u7ec4\u540d")]\r\npublic class MyJob : IJob\r\n{\r\n // ....\r\n}\n'})}),"\n",(0,s.jsx)(r.h3,{id:"26136-\u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa",children:"26.1.3.6 \u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"JobDetail"})," \u548c ",(0,s.jsx)(r.code,{children:"JobBuilder"})," \u90fd\u63d0\u4f9b\u4e86\u591a\u79cd\u5c06\u81ea\u8eab\u8f6c\u6362\u6210\u7279\u5b9a\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\u3002"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var json = jobDetail.ConvertToJSON();\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u5b57\u7b26\u4e32\u6253\u5370\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",metastring:"showLineNumbers",children:'{\r\n "jobId": "job1",\r\n "groupName": null,\r\n "jobType": "MyJob",\r\n "assemblyName": "ConsoleApp13",\r\n "description": null,\r\n "concurrent": true,\r\n "includeAnnotations": false,\r\n "properties": "{}",\r\n "updatedTime": "2022-12-04 11:51:00.483"\r\n}\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"SQL"})," \u5b57\u7b26\u4e32"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,6,9,13,16,20}",children:'// \u8f93\u51fa\u65b0\u589e SQL\uff0c\u4f7f\u7528 CamelCase \u5c5e\u6027\u547d\u540d\r\nvar insertSql = jobDetail.ConvertToSQL("tbName"\r\n , PersistenceBehavior.Appended\r\n , NamingConventions.CamelCase);\r\n// \u66f4\u4fbf\u6377\u62d3\u5c55\r\nvar insertSql = jobDetail.ConvertToInsertSQL("tbName", NamingConventions.CamelCase);\r\n\r\n// \u8f93\u51fa\u5220\u9664 SQL\uff0c\u4f7f\u7528 Pascal \u5c5e\u6027\u547d\u540d\r\nvar deleteSql = jobDetail.ConvertToSQL("tbName"\r\n , PersistenceBehavior.Removed\r\n , NamingConventions.Pascal);\r\n// \u66f4\u4fbf\u6377\u62d3\u5c55\r\nvar deleteSql = jobDetail.ConvertToDeleteSQL("tbName", NamingConventions.Pascal);\r\n\r\n// \u8f93\u51fa\u66f4\u65b0 SQL\uff0c\u4f7f\u7528 UnderScoreCase \u5c5e\u6027\u547d\u540d\r\nvar updateSql = jobDetail.ConvertToSQL("tbName"\r\n , PersistenceBehavior.Updated\r\n , NamingConventions.UnderScoreCase);\r\n// \u66f4\u4fbf\u6377\u62d3\u5c55\r\nvar updateSql = jobDetail.ConvertToUpdateSQL("tbName", NamingConventions.UnderScoreCase);\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u5b57\u7b26\u4e32\u6253\u5370\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sql",metastring:"showLineNumbers {2,25,28}",children:"-- \u65b0\u589e\u8bed\u53e5\r\nINSERT INTO tbName(\r\n jobId,\r\n groupName,\r\n jobType,\r\n assemblyName,\r\n description,\r\n concurrent,\r\n includeAnnotations,\r\n properties,\r\n updatedTime\r\n)\r\nVALUES(\r\n 'job1',\r\n NULL,\r\n 'MyJob',\r\n 'ConsoleApp13',\r\n NULL,\r\n 1,\r\n 0,\r\n '{}',\r\n '2022-12-04 11:53:05.489'\r\n);\r\n-- \u5220\u9664\u8bed\u53e5\r\nDELETE FROM tbName\r\nWHERE JobId = 'job1';\r\n-- \u66f4\u65b0\u8bed\u53e5\r\nUPDATE tbName\r\nSET\r\n job_id = 'job1',\r\n group_name = NULL,\r\n job_type = 'MyJob',\r\n assembly_name = 'ConsoleApp13',\r\n description = NULL,\r\n concurrent = 1,\r\n include_annotations = 0,\r\n properties = '{}',\r\n updated_time = '2022-12-04 11:53:05.489'\r\nWHERE job_id = 'job1';\n"})}),"\n",(0,s.jsxs)(r.ol,{start:"3",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"Monitor"})," \u5b57\u7b26\u4e32"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var monitor = jobDetail.ConvertToMonitor();\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u5b57\u7b26\u4e32\u6253\u5370\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers",children:"\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 JobDetail \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\r\n\u2523 MyJob\r\n\u2523\r\n\u2523 jobId\uff1a job1\r\n\u2523 groupName\uff1a\r\n\u2523 jobType\uff1a MyJob\r\n\u2523 assemblyName\uff1a ConsoleApp13\r\n\u2523 description\uff1a\r\n\u2523 concurrent\uff1a True\r\n\u2523 includeAnnotations\uff1a False\r\n\u2523 properties\uff1a {}\r\n\u2523 updatedTime\uff1a 2022-12-04 11:55:11.186\r\n\u2517\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 JobDetail \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n"})}),"\n",(0,s.jsxs)(r.ol,{start:"4",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.strong,{children:"\u7b80\u8981\u5b57\u7b26\u4e32\u8f93\u51fa"})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var str = jobDetail.ToString();\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u5b57\u7b26\u4e32\u6253\u5370\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers",children:"<job1> \u8fd9\u662f\u4e00\u6bb5\u63cf\u8ff0 [C]\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"26137-\u81ea\u5b9a\u4e49-sql-\u8f93\u51fa\u914d\u7f6e",children:["26.1.3.7 \u81ea\u5b9a\u4e49 ",(0,s.jsx)(r.code,{children:"SQL"})," \u8f93\u51fa\u914d\u7f6e"]}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.2 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3,8,13,18}",children:"services.AddSchedule(options =>\r\n{\r\n options.JobDetail.ConvertToSQL = (tableName, columnNames, jobDetail, behavior, naming) =>\r\n {\r\n // \u751f\u6210\u65b0\u589e SQL\r\n if (behavior == PersistenceBehavior.Appended)\r\n {\r\n return jobDetail.ConvertToInsertSQL(tableName, naming);\r\n }\r\n // \u751f\u6210\u66f4\u65b0 SQL\r\n else if (behavior == PersistenceBehavior.Updated)\r\n {\r\n return jobDetail.ConvertToUpdateSQL(tableName, naming);\r\n }\r\n // \u751f\u6210\u5220\u9664 SQL\r\n else if (behavior == PersistenceBehavior.Removed)\r\n {\r\n return jobDetail.ConvertToDeleteSQL(tableName, naming);\r\n }\r\n\r\n return string.Empty;\r\n };\r\n});\n"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ConvertToSQL"})," \u59d4\u6258\u53c2\u6570\u8bf4\u660e","\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"tableName"}),"\uff1a\u6570\u636e\u5e93\u8868\u540d\u79f0\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"columnNames"}),"\uff1a\u6570\u636e\u5e93\u5217\u540d\uff1a",(0,s.jsx)(r.code,{children:"string[]"})," \u7c7b\u578b\uff0c\u53ea\u80fd\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"\u7d22\u5f15"})," \u83b7\u53d6"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"jobDetail"}),"\uff1a\u4f5c\u4e1a\u4fe1\u606f ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u5bf9\u8c61"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"behavior"}),"\uff1a\u6301\u4e45\u5316 ",(0,s.jsx)(r.code,{children:"PersistenceBehavior"})," \u7c7b\u578b\uff0c\u7528\u4e8e\u6807\u8bb0 ",(0,s.jsx)(r.code,{children:"\u65b0\u589e"}),"\uff0c",(0,s.jsx)(r.code,{children:"\u66f4\u65b0"})," \u8fd8\u662f ",(0,s.jsx)(r.code,{children:"\u5220\u9664"})," \u64cd\u4f5c"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"naming"}),"\uff1a\u547d\u540d\u6cd5 ",(0,s.jsx)(r.code,{children:"NamingConventions"})," \u7c7b\u578b\uff0c\u5305\u542b ",(0,s.jsx)(r.code,{children:"CamelCase\uff08\u9a7c\u5cf0\u547d\u540d\u6cd5\uff09"}),"\uff0c",(0,s.jsx)(r.code,{children:"Pascal\uff08\u5e15\u65af\u5361\u547d\u540d\u6cd5\uff09"})," \u548c ",(0,s.jsx)(r.code,{children:"UnderScoreCase\uff08\u4e0b\u5212\u7ebf\u547d\u540d\u6cd5\uff09"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.admonition,{title:"\u6ce8\u610f\u4e8b\u9879",type:"caution",children:(0,s.jsxs)(r.p,{children:["\u5982\u679c\u5728\u8be5\u81ea\u5b9a\u4e49 ",(0,s.jsx)(r.code,{children:"SQL"})," \u8f93\u51fa\u65b9\u6cd5\u4e2d\u8c03\u7528 ",(0,s.jsx)(r.code,{children:"jobDetail.ConvertToSQL(..)"})," \u4f1a\u5bfc\u81f4\u6b7b\u5faa\u73af\u3002"]})}),"\n",(0,s.jsx)(r.h3,{id:"26138-\u542f\u7528\u4f5c\u4e1a\u6267\u884c\u65e5\u5fd7\u8f93\u51fa",children:"26.1.3.8 \u542f\u7528\u4f5c\u4e1a\u6267\u884c\u65e5\u5fd7\u8f93\u51fa"}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.3.7 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u901a\u5e38\u6211\u4eec\u9700\u8981\u5728 ",(0,s.jsx)(r.code,{children:"IJob"})," \u5b9e\u73b0\u7c7b\u4e2d\u8f93\u51fa\u4f5c\u4e1a\u89e6\u53d1\u65e5\u5fd7\uff0c\u5982 ",(0,s.jsx)(r.code,{children:'_logger.LogInformation($"{context}");'})]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {11}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsxs)(r.strong,{children:["\u4f46\u8fd9\u6837\u7684 ",(0,s.jsx)(r.code,{children:"\u8303\u5f0f\u4ee3\u7801"})," \u51e0\u4e4e\u6bcf\u4e00\u4e2a ",(0,s.jsx)(r.code,{children:"IJob"})," \u5b9e\u73b0\u7c7b\u90fd\u53ef\u80fd\u8f93\u51fa"]}),"\uff0c\u6240\u4ee5\u5728 ",(0,s.jsx)(r.code,{children:"Furion 4.8.3.7+"})," \u7248\u672c\u63d0\u4f9b\u4e86\u66f4\u4fbf\u6377\u7684\u914d\u7f6e\uff0c\u65e0\u9700\u6bcf\u4e00\u4e2a ",(0,s.jsx)(r.code,{children:"IJob"})," \u7f16\u5199 ",(0,s.jsx)(r.code,{children:'_logger.LogInformation($"{context}");'}),"\u3002"]}),"\n",(0,s.jsx)(r.p,{children:"\u914d\u7f6e\u542f\u7528\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:"services.AddSchedule(options =>\r\n{\r\n options.JobDetail.LogEnabled = true; // \u9ed8\u8ba4 false\r\n});\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u4e4b\u540e ",(0,s.jsx)(r.code,{children:"MyJob"})," \u53ef\u4ee5\u66f4\u52a0\u7cbe\u7b80\u4e86\uff0c\u65e5\u5fd7\u7c7b\u522b\u81ea\u52a8\u8bbe\u7f6e\u4e3a ",(0,s.jsx)(r.code,{children:"MyJob"})," \u7c7b\u578b\u5b8c\u6574\u9650\u5b9a\u540d\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {5}",children:'public class MyJob : IJob\r\n{\r\n public Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n // \u8fd9\u91cc\u5199\u4e1a\u52a1\u903b\u8f91\u5373\u53ef\uff0c\u65e0\u9700\u8c03\u7528 _logger.LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u4f5c\u4e1a\u6267\u884c\u65e5\u5fd7\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {1,3,5}",children:"info: 2022-12-14 11:56:12.3963326 +08:00 \u661f\u671f\u4e09 L Furion.Application.MyJob[0] #4\r\n <job1> [C] <job1 job1_trigger2> 5s 1ts 2022-12-14 11:56:08.361 -> 2022-12-14 11:56:13.366\r\ninfo: 2022-12-14 11:56:13.4100745 +08:00 \u661f\u671f\u4e09 L Furion.Application.MyJob[0] #6\r\n <job1> [C] <job1 job1_trigger2> 5s 2ts 2022-12-14 11:56:13.366 -> 2022-12-14 11:56:18.376\r\ninfo: 2022-12-14 11:56:18.3931380 +08:00 \u661f\u671f\u4e09 L Furion.Application.MyJob[0] #9\r\n <job1> [C] <job1 job1_trigger2> 5s 3ts 2022-12-14 11:56:18.376 -> 2022-12-14 11:56:23.360\n"})}),"\n",(0,s.jsxs)(r.h2,{id:"2614-\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f-ijob",children:["26.1.4 \u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f ",(0,s.jsx)(r.code,{children:"IJob"})]}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u662f\u4f5c\u4e1a\u7b26\u5408\u89e6\u53d1\u65f6\u95f4\u6267\u884c\u7684\u4e1a\u52a1\u903b\u8f91\u4ee3\u7801\uff0c\u901a\u5e38\u7531\u7a0b\u5e8f\u5458\u7f16\u5199\uff0c\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u9700\u5b9e\u73b0 ",(0,s.jsx)(r.code,{children:"IJob"})," \u63a5\u53e3\u3002"]}),"\n",(0,s.jsx)(r.h3,{id:"26141-\u5982\u4f55\u5b9a\u4e49",children:"26.1.4.1 \u5982\u4f55\u5b9a\u4e49"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3,5}",children:"public class MyJob : IJob\r\n{\r\n public Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n // your code...\r\n }\r\n}\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"26142-jobexecutingcontext-\u4e0a\u4e0b\u6587",children:["26.1.4.2 ",(0,s.jsx)(r.code,{children:"JobExecutingContext"})," \u4e0a\u4e0b\u6587"]}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"JobExecutingContext"})," \u4e0a\u4e0b\u6587\u4f5c\u4e3a ",(0,s.jsx)(r.code,{children:"ExecuteAsync"})," \u65b9\u6cd5\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\uff0c\u5305\u542b\u4ee5\u4e0b\u8fd0\u884c\u65f6\u4fe1\u606f\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"JobExecutingContext"})," \u5c5e\u6027\u5217\u8868"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"JobId"}),"\uff1a\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"Id"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"TriggerId"}),"\uff1a\u5f53\u524d\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Id"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"JobDetail"}),"\uff1a\u4f5c\u4e1a\u4fe1\u606f"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Trigger"}),"\uff1a\u4f5c\u4e1a\u89e6\u53d1\u5668"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"OccurrenceTime"}),"\uff1a\u4f5c\u4e1a\u8ba1\u5212\u89e6\u53d1\u65f6\u95f4\uff0c\u6700\u51c6\u786e\u7684\u8bb0\u5f55\u65f6\u95f4"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ExecutingTime"}),"\uff1a\u5b9e\u9645\u6267\u884c\u65f6\u95f4\uff08\u53ef\u80fd\u5b58\u5728\u8bef\u5dee\uff09"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"RunId"}),"\uff1a\u672c\u6b21\u4f5c\u4e1a\u6267\u884c\u552f\u4e00 ",(0,s.jsx)(r.code,{children:"Id"}),"\uff0c",(0,s.jsx)(r.code,{children:"Furion 4.8.5.1+"})," \u63d0\u4f9b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Result"}),"\uff1a\u8bbe\u7f6e/\u8bfb\u53d6\u672c\u6b21\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff0c",(0,s.jsx)(r.code,{children:"Furion 4.8.7.7+"})," \u63d0\u4f9b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ServiceProvider"}),"\uff1a\u670d\u52a1\u63d0\u4f9b\u5668\uff0c",(0,s.jsx)(r.code,{children:"Furion 4.8.7.10+"})," \u63d0\u4f9b"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"JobExecutingContext"})," \u65b9\u6cd5\u5217\u8868"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:".ConvertToJSON(naming)"}),"\uff1a\u5c06\u4e0a\u4e0b\u6587\u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:".ToString()"}),"\uff1a\u8f93\u51fa\u4e3a\u5b57\u7b26\u4e32"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"26143-\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u5b9e\u4f8b",children:"26.1.4.3 \u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u5b9e\u4f8b"}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.8.13 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u4f1a\u5728\u4f5c\u4e1a\u89e6\u53d1\u5668\u7b26\u5408\u89e6\u53d1\u6761\u4ef6\u4e0b\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"ActivatorUtilities.CreateInstance"})," \u52a8\u6001\u521b\u5efa\uff0c\u4e5f\u5c31\u662f",(0,s.jsxs)(r.strong,{children:["\u6bcf\u6b21\u89e6\u53d1\u90fd\u4f1a\u521b\u5efa\u65b0\u7684 ",(0,s.jsx)(r.code,{children:"IJob"})," \u5b9e\u4f8b"]}),"\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var jobHandler = ActivatorUtilities.CreateInstance(_serviceProvider, jobType);\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u5176\u4e2d ",(0,s.jsx)(r.code,{children:"_serviceProvider"})," \u662f",(0,s.jsx)(r.strong,{children:"\u5355\u4f8b\u670d\u52a1\u63d0\u4f9b\u5668"}),"\uff0c\u6240\u4ee5 ",(0,s.jsx)(r.code,{children:"IJob"})," \u5b9e\u73b0\u7c7b\u53ea\u80fd\u901a\u8fc7\u6784\u9020\u51fd\u6570\u6ce8\u5165 ",(0,s.jsx)(r.code,{children:"\u5355\u4f8b\u670d\u52a1"}),"\u3002\u5982\u679c\u6ca1\u6709\u8303\u56f4\u4f5c\u7528\u57df\u670d\u52a1\u7684\u9700\u6c42\uff0c\u90a3\u4e48\u53ef\u4ee5\u5c06 ",(0,s.jsx)(r.code,{children:"IJob"})," \u6ce8\u518c\u4e3a\u5355\u4f8b\u670d\u52a1\uff0c",(0,s.jsxs)(r.strong,{children:["\u8fd9\u6837\u5c31\u53ef\u4ee5\u907f\u514d\u6bcf\u6b21\u91cd\u590d\u521b\u5efa ",(0,s.jsx)(r.code,{children:"IJob"})," \u5b9e\u4f8b\uff0c\u5bf9\u6027\u80fd\u548c\u51cf\u5c11\u5185\u5b58\u5360\u7528\u6709\u4e0d\u5c0f\u4f18\u5316\u3002"]})," \u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"services.AddSingleton<YourJob>();\n"})}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"\u5982\u679c\u5e0c\u671b\u80fd\u591f\u5728\u6784\u9020\u51fd\u6570\u6ce8\u5165\u8303\u56f4\u4f5c\u7528\u57df\u6216\u77ac\u65f6\u4f5c\u7528\u57df"}),"\uff0c\u53ef\u5b9e\u73b0 ",(0,s.jsx)(r.code,{children:"IJobFactory"})," \u63a5\u53e3\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {6,8-10,12-13}",children:"using Furion.Schedule;\r\nusing Microsoft.Extensions.DependencyInjection;\r\n\r\nnamespace Furion.Application;\r\n\r\npublic class JobFactory : IJobFactory\r\n{\r\n public IJob CreateJob(IServiceProvider serviceProvider, JobFactoryContext context)\r\n {\r\n return ActivatorUtilities.CreateInstance(serviceProvider, context.JobType) as IJob;\r\n\r\n // \u5982\u679c\u901a\u8fc7 services.AddSingleton<YourJob>(); \u6216 serivces.AddScoped<YourJob>(); \u6216 services.AddTransient<YourJob> \u53ef\u901a\u8fc7\u4e0b\u5217\u65b9\u5f0f\r\n // return serviceProvider.GetRequiredService(context.JobType) as IJob;\r\n }\r\n}\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u4e4b\u540e\u6ce8\u518c ",(0,s.jsx)(r.code,{children:"JobFactory"})," \u5373\u53ef\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4}",children:"services.AddSchedule(options =>\r\n{\r\n // \u6dfb\u52a0\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u5de5\u5382\r\n options.AddJobFactory<JobFactory>();\r\n});\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u8fd9\u6837\u4f5c\u4e1a\u5c31\u53ef\u4ee5\u6ce8\u5165\u8303\u56f4\u548c\u77ac\u65f6\u670d\u52a1\u4e86\u3002"}),"\n",(0,s.jsx)(r.h3,{id:"26144-\u4f9d\u8d56\u6ce8\u5165",children:"26.1.4.4 \u4f9d\u8d56\u6ce8\u5165"}),"\n",(0,s.jsxs)(r.p,{children:["\u5b9e\u73b0 ",(0,s.jsx)(r.code,{children:"IJob"})," \u7684\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u7c7b\u578b\u9ed8\u8ba4\u6ce8\u518c\u4e3a ",(0,s.jsx)(r.code,{children:"\u5355\u4f8b"}),"\uff0c",(0,s.jsx)(r.strong,{children:"\u90a3\u4e48\u53ea\u8981\u662f\u5355\u4f8b\u7684\u670d\u52a1\uff0c\u7686\u53ef\u4ee5\u901a\u8fc7\u6784\u9020\u51fd\u6570\u6ce8\u5165"}),"\uff0c\u5982\uff1a",(0,s.jsx)(r.code,{children:"ILogger<>"}),"\uff0c",(0,s.jsx)(r.code,{children:"IConfiguration"}),"\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3-4,6-7}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n private readonly IConfiguration _configuration;\r\n\r\n public MyJob(ILogger<MyJob> logger\r\n , IConfiguration configuration)\r\n {\r\n _logger = logger;\r\n _configuration = configuration;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context} {_configuration["key"]}");\r\n await Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u5982\u679c\u662f\u975e ",(0,s.jsx)(r.code,{children:"\u5355\u4f8b"})," \u7684\u63a5\u53e3\uff0c\u5982 ",(0,s.jsx)(r.code,{children:"\u77ac\u65f6"})," \u6216 ",(0,s.jsx)(r.code,{children:"\u8303\u56f4"})," \u670d\u52a1\uff0c\u53ef\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"IServiceScopeFactory"})," \u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsxs)(r.admonition,{type:"tip",children:[(0,s.jsxs)(r.mdxAdmonitionTitle,{children:["\u63a8\u8350 ",(0,s.jsx)(r.code,{children:"IJobFactory"})," \u65b9\u5f0f"]}),(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"Furion 4.8.8.13+"})," \u7248\u672c\u53ef\u4ee5\u901a\u8fc7\u4e0a\u4e00\u5c0f\u8282 ",(0,s.jsx)(r.code,{children:"IJobFactory"})," \u7edf\u4e00\u5b9e\u73b0\u3002",(0,s.jsx)(r.strong,{children:"\u63a8\u8350"}),"\u3002"]})]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {5,9,18-19}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n private readonly IConfiguration _configuration;\r\n private readonly IServiceScopeFactory _scopeFactory;\r\n\r\n public MyJob(ILogger<MyJob> logger\r\n , IConfiguration configuration\r\n , IServiceScopeFactory scopeFactory)\r\n {\r\n _logger = logger;\r\n _configuration = configuration;\r\n _schedulerFactory = scopeFactory;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n using var serviceScope = _scopeFactory.CreateScope();\r\n var repository = serviceScope.ServiceProvider.GetService<IRepository<User>>();\r\n\r\n _logger.LogInformation($"{context} {_configuration["key"]}");\r\n await Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.strong,{children:"\u9488\u5bf9\u9ad8\u9891\u5b9a\u65f6\u4efb\u52a1\uff0c\u6bd4\u5982\u6bcf\u79d2\u6267\u884c\u4e00\u6b21\uff0c\u6216\u8005\u66f4\u9891\u7e41\u7684\u4efb\u52a1"})}),"\n"]}),"\n",(0,s.jsxs)(r.admonition,{type:"tip",children:[(0,s.jsxs)(r.mdxAdmonitionTitle,{children:["\u63a8\u8350 ",(0,s.jsx)(r.code,{children:"IJobFactory"})," \u65b9\u5f0f"]}),(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"Furion 4.8.8.13+"})," \u7248\u672c\u53ef\u4ee5\u901a\u8fc7\u4e0a\u4e00\u5c0f\u8282 ",(0,s.jsx)(r.code,{children:"IJobFactory"})," \u7edf\u4e00\u5b9e\u73b0\u3002",(0,s.jsx)(r.strong,{children:"\u63a8\u8350"}),"\u3002"]})]}),"\n",(0,s.jsx)(r.p,{children:"\u4e3a\u4e86\u907f\u514d\u9891\u7e41\u521b\u5efa\u4f5c\u7528\u57df\u548c\u9500\u6bc1\u4f5c\u7528\u57df\uff0c\u53ef\u521b\u5efa\u957f\u8303\u56f4\u7684\u4f5c\u7528\u57df\u3002"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,5,13,18,25,27}",children:'public class MyJob : IJob, IDisposable\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n private readonly IConfiguration _configuration;\r\n private readonly IServiceScope _serviceScope;\r\n\r\n public MyJob(ILogger<MyJob> logger\r\n , IConfiguration configuration\r\n , IServiceScopeFactory scopeFactory)\r\n {\r\n _logger = logger;\r\n _configuration = configuration;\r\n _serviceScope = scopeFactory.CreateScope();\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n var repository = _serviceScope.ServiceProvider.GetService<IRepository<User>>();\r\n var user = await repository.GetAsync(1);\r\n\r\n _logger.LogInformation($"{context} {_configuration["key"]}");\r\n await Task.CompletedTask;\r\n }\r\n\r\n public void Dispose()\r\n {\r\n _serviceScope?.Dispose();\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.h3,{id:"26145-\u52a8\u6001\u4f5c\u4e1a-dynamicjob",children:["26.1.4.5 \u52a8\u6001\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"DynamicJob"})]}),"\n",(0,s.jsxs)(r.p,{children:["\u6846\u67b6\u63d0\u4f9b\u4e86\u4fbf\u6377\u7684\u52a8\u6001\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"DynamicJob"})," \u7c7b\u578b\uff0c\u53ef\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"Func<JobExecutingContext, CancellationToken, Task>"})," \u59d4\u6258\u4f20\u5165\uff0c\u65e0\u9700\u521b\u5efa ",(0,s.jsx)(r.code,{children:"IJob"})," \u5b9e\u73b0\u7c7b\u578b\u3002"]}),"\n",(0,s.jsxs)(r.p,{children:["\u6846\u67b6\u8fd8\u4e3a ",(0,s.jsx)(r.code,{children:"JobExecutionContext"})," \u5c5e\u6027 ",(0,s.jsx)(r.code,{children:"ServiceProvder"})," \u63d0\u4f9b\u4e86 ",(0,s.jsx)(r.code,{children:".GetLogger()"})," \u62d3\u5c55\u65b9\u6cd5\uff0c\u65b9\u4fbf\u5feb\u901f\u83b7\u53d6 ",(0,s.jsx)(r.code,{children:"ILogger<System.Logging.DynamicJob>"})," \u65e5\u5fd7\u5bf9\u8c61\u5b9e\u4f8b\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,9,18,26}",children:'// \u901a\u8fc7 JobBuilder \u521b\u5efa\r\nvar jobBuilder = JobBuilder.Create((context, stoppingToken) =>\r\n{\r\n context.ServiceProvider.GetLogger().LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n});\r\n\r\n// \u901a\u8fc7 jobBuilder \u65b9\u6cd5 SetDynamicExecuteAsync \u521b\u5efa\r\njobBuilder.SetDynamicExecuteAsync((context, stoppingToken) =>\r\n{\r\n context.ServiceProvider.GetLogger().LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n});\r\n\r\n// \u901a\u8fc7 AddJob \u521b\u5efa\r\nservice.AddSchedule(options =>\r\n{\r\n options.AddJob((context, stoppingToken) =>\r\n {\r\n context.ServiceProvider.GetLogger().LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n }, Triggers.PeriodSeconds(5));\r\n});\r\n\r\n// \u901a\u8fc7 ISchedulerFactory \u521b\u5efa\r\n_schedulerFactory.AddJob((context, stoppingToken) =>\r\n{\r\n context.ServiceProvider.GetLogger().LogInformation($"{context}");\r\n return Task.CompletedTask;\r\n}, Triggers.PeriodSeconds(5));\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u52a8\u6001\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {6,8,10,11,13}",children:"info: 2022-12-04 12:26:18.6562296 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-04 12:26:18.6618404 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-04 12:26:18.8727764 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-04 12:26:18.8745765 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-04 12:26:18.9013540 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-04 12:26:23.8753926 +08:00 \u661f\u671f\u65e5 L System.Logging.DynamicJob[0] #6\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-04 12:26:23.837 -> 2022-12-04 12:26:28.835\r\ninfo: 2022-12-04 12:26:28.8686474 +08:00 \u661f\u671f\u65e5 L System.Logging.DynamicJob[0] #6\r\n <job1> [C] <job1 job1_trigger1> 5s 2ts 2022-12-04 12:26:28.835 -> 2022-12-04 12:26:33.823\r\ninfo: 2022-12-04 12:26:33.8531796 +08:00 \u661f\u671f\u65e5 L System.Logging.DynamicJob[0] #13\r\n <job1> [C] <job1 job1_trigger1> 5s 3ts 2022-12-04 12:26:33.823 -> 2022-12-04 12:26:38.820\n"})}),"\n",(0,s.jsx)(r.admonition,{title:"\u52a8\u6001\u4f5c\u4e1a\u548c\u666e\u901a\u4f5c\u4e1a\u7684\u533a\u522b",type:"tip",children:(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\u52a8\u6001\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u7c7b\u578b\u662f\uff1a",(0,s.jsx)(r.code,{children:"DynamicJob"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:["\u52a8\u6001\u4f5c\u4e1a\u63d0\u4f9b\u7684 ",(0,s.jsx)(r.code,{children:".GetLogger()"})," \u62d3\u5c55\u8f93\u51fa\u65e5\u5fd7\u7c7b\u522b\u662f\uff1a",(0,s.jsx)(r.code,{children:"System.Logging.DynamicJob"})]}),"\n",(0,s.jsxs)(r.li,{children:["\u5982\u679c\u666e\u901a\u4f5c\u4e1a\u540c\u65f6\u8bbe\u7f6e\u4e86 ",(0,s.jsx)(r.code,{children:"SetJobType"})," \u548c ",(0,s.jsx)(r.code,{children:"SetDynamicExecuteAsync"}),"\uff0c\u90a3\u4e48\u4f18\u5148\u4f5c\u4e3a\u52a8\u6001\u4f5c\u4e1a\u6267\u884c\u3002"]}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u52a8\u6001\u4f5c\u4e1a\u65e0\u6cd5\u5c06 ",(0,s.jsx)(r.code,{children:"Func<..>"})," \u8fdb\u884c\u5e8f\u5217\u5316\u6301\u4e45\u5316\u5b58\u50a8"]})}),"\n"]})}),"\n",(0,s.jsxs)(r.h3,{id:"26146-\u4f7f\u7528-roslyn-\u52a8\u6001\u521b\u5efa",children:["26.1.4.6 \u4f7f\u7528 ",(0,s.jsx)(r.code,{children:"Roslyn"})," \u52a8\u6001\u521b\u5efa"]}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.8.7 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u6309\u7167\u7a0b\u5e8f\u5f00\u53d1\u7684\u6b63\u5e38\u601d\u7ef4\uff0c\u7406\u5e94\u5148\u5728\u4ee3\u7801\u4e2d\u521b\u5efa\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u7c7b\u578b\uff0c\u4f46\u6211\u4eec\u53ef\u4ee5\u501f\u52a9 ",(0,s.jsx)(r.code,{children:"Roslyn"})," \u52a8\u6001\u7f16\u8bd1 ",(0,s.jsx)(r.code,{children:"C#"})," \u4ee3\u7801\u3002"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u6839\u636e\u5b57\u7b26\u4e32\u521b\u5efa ",(0,s.jsx)(r.code,{children:"IJob"})," \u7c7b\u578b"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,9,11,29}",children:'// \u8c03\u7528 Schedular \u9759\u6001\u7c7b\u63d0\u4f9b\u7684 CompileCSharpClassCode \u65b9\u6cd5\r\nvar jobAssembly = Schedular.CompileCSharpClassCode(@"\r\nusing Furion.Schedule;\r\nusing Microsoft.Extensions.Logging;\r\nusing System;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace YourProject;\r\n\r\npublic class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($""\u6211\u662f Roslyn \u65b9\u5f0f\u521b\u5efa\u7684\uff1a{context}"");\r\n await Task.CompletedTask;\r\n }\r\n}\r\n");\r\n\r\n// \u751f\u6210\u8fd0\u884c\u65f6 MyJob \u7c7b\u578b\r\nvar jobType = jobAssembly.GetType("YourProject.MyJob");\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.strong,{children:"\u6ce8\u518c\u4f5c\u4e1a"})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4,9}",children:"// \u53ef\u4ee5\u5728\u542f\u52a8\u7684\u65f6\u5019\u6dfb\u52a0\r\nservices.AddSchedule(options =>\r\n{\r\n options.AddJob(jobType\r\n , Triggers.PeriodSeconds(5));\r\n});\r\n\r\n// \u4e5f\u53ef\u4ee5\u5b8c\u5168\u5728\u8fd0\u884c\u65f6\u6dfb\u52a0\uff08\u5e38\u7528\uff09\r\n_schedulerFactory.AddJob(jobType\r\n , Triggers.PeriodSeconds(5));\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u65e5\u5fd7\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {6,8,10,12,14,16}",children:"info: 2022-12-04 12:38:00.6249410 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-04 12:38:00.6294089 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-04 12:38:00.7496005 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-04 12:38:00.7514579 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-04 12:38:00.7836777 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-04 12:38:05.7389682 +08:00 \u661f\u671f\u65e5 L YourProject.MyJob[0] #6\r\n \u6211\u662f Roslyn \u65b9\u5f0f\u521b\u5efa\u7684\uff1a<job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-04 12:38:05.713 -> 2022-12-04 12:38:10.692\r\ninfo: 2022-12-04 12:38:10.7108416 +08:00 \u661f\u671f\u65e5 L YourProject.MyJob[0] #11\r\n \u6211\u662f Roslyn \u65b9\u5f0f\u521b\u5efa\u7684\uff1a<job1> [C] <job1 job1_trigger1> 5s 2ts 2022-12-04 12:38:10.692 -> 2022-12-04 12:38:15.673\r\ninfo: 2022-12-04 12:38:15.6925578 +08:00 \u661f\u671f\u65e5 L YourProject.MyJob[0] #11\r\n \u6211\u662f Roslyn \u65b9\u5f0f\u521b\u5efa\u7684\uff1a<job1> [C] <job1 job1_trigger1> 5s 3ts 2022-12-04 12:38:15.673 -> 2022-12-04 12:38:20.656\n"})}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"\u60ca\u4e0d\u60ca\u559c\uff0c\u610f\u5916\u610f\u5916~"}),"\u3002"]}),"\n",(0,s.jsx)(r.admonition,{title:"\u5c0f\u77e5\u8bc6",type:"tip",children:(0,s.jsxs)(r.p,{children:["\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"Roslyn"})," \u7684\u65b9\u5f0f\u652f\u6301\u521b\u5efa ",(0,s.jsx)(r.code,{children:"IJob"}),"\uff0c",(0,s.jsx)(r.code,{children:"JobDetail"}),"\uff0c",(0,s.jsx)(r.code,{children:"Trigger"}),"\uff0c",(0,s.jsx)(r.code,{children:"Scheduler"})," \u54e6\uff0c\u81ea\u884c\u6d4b\u8bd5\u3002\ud83d\ude0a"]})}),"\n",(0,s.jsx)(r.h3,{id:"26147-\u4f5c\u4e1a\u6267\u884c\u5f02\u5e38\u5904\u7406",children:"26.1.4.7 \u4f5c\u4e1a\u6267\u884c\u5f02\u5e38\u5904\u7406"}),"\n",(0,s.jsx)(r.p,{children:"\u6b63\u5e38\u60c5\u51b5\u4e0b\uff0c\u7a0b\u5e8f\u5458\u5e94\u8be5\u4fdd\u8bc1\u4f5c\u4e1a\u6267\u884c\u7a0b\u5e8f\u603b\u662f\u7a33\u5b9a\u8fd0\u884c\uff0c\u4f46\u6709\u65f6\u5019\u4f1a\u51fa\u73b0\u4e00\u4e9b\u4e0d\u53ef\u907f\u514d\u7684\u610f\u5916\u5bfc\u81f4\u51fa\u73b0\u5f02\u5e38\uff0c\u5982\u7f51\u7edc\u5f02\u5e38\u7b49\u3002"}),"\n",(0,s.jsx)(r.p,{children:"\u4e0b\u9762\u7ed9\u51fa\u6a21\u62df\u51fa\u73b0\u5f02\u5e38\u548c\u5e38\u89c1\u7684\u5904\u7406\u65b9\u5f0f\u4f8b\u5b50\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:"services.AddSchedule(options =>\r\n{\r\n options.AddJob<MyJob>(Triggers.PeriodSeconds(3));\r\n});\n"})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {13-16}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context}");\r\n\r\n // \u6a21\u62df\u5f02\u5e38\r\n var num = 10;\r\n var n = 0;\r\n var c = num / n;\r\n\r\n return Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u8f93\u51fa\u65e5\u5fd7\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {11-13,23-25}",children:"info: 2023-04-22 22:18:04.2149071 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2023-04-22 22:18:04.2189082 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2023-04-22 22:18:04.3216571 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2023-04-22 22:18:04.3230110 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2023-04-22 22:18:04.3521056 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2023-04-22 22:18:07.3782666 +08:00 \u661f\u671f\u516d L MyJob[0] #17\r\n <job1> [C] <job1 job1_trigger1> 3s 1ts 2023-04-22 22:18:07.288 -> 2023-04-22 22:18:10.308\r\nfail: 2023-04-22 22:18:07.6652239 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #17\r\n Error occurred executing <job1> [C] <job1 job1_trigger1> 3s 1ts 2023-04-22 22:18:07.288 -> 2023-04-22 22:18:10.308.\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.DivideByZeroException: Attempted to divide by zero.\r\n at MyJob.ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) in C:\\Users\\MonkSoul\\source\\repos\\ConsoleApp3\\Program.cs:line 29\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_3.<<BackgroundProcessing>b__3>d.MoveNext() in C:\\Workplaces\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 233\r\n --- End of stack trace from previous location ---\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in C:\\Workplaces\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 79\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_2.<<BackgroundProcessing>b__2>d.MoveNext() in C:\\Workplaces\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 231\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\ninfo: 2023-04-22 22:18:10.3507729 +08:00 \u661f\u671f\u516d L MyJob[0] #8\r\n <job1> [C] <job1 job1_trigger1> 3s 2ts 2023-04-22 22:18:10.308 -> 2023-04-22 22:18:13.318\r\nfail: 2023-04-22 22:18:10.4292529 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #8\r\n Error occurred executing <job1> [C] <job1 job1_trigger1> 3s 2ts 2023-04-22 22:18:10.308 -> 2023-04-22 22:18:13.318.\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.DivideByZeroException: Attempted to divide by zero.\r\n at MyJob.ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) in C:\\Users\\MonkSoul\\source\\repos\\ConsoleApp3\\Program.cs:line 29\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_3.<<BackgroundProcessing>b__3>d.MoveNext() in C:\\Workplaces\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 233\r\n --- End of stack trace from previous location ---\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in C:\\Workplaces\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 79\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_2.<<BackgroundProcessing>b__2>d.MoveNext() in C:\\Workplaces\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 231\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u4ece\u4e0a\u9762\u6267\u884c\u65e5\u5fd7\u53ef\u4ee5\u770b\u51fa\uff0c\u4f5c\u4e1a\u6267\u884c\u51fa\u73b0\u5f02\u5e38\u53ea\u4f1a\u5f71\u54cd\u5f53\u524d\u89e6\u53d1\u65f6\u95f4\u7684\u6267\u884c\uff0c\u4f46\u4e0d\u4f1a\u5f71\u54cd\u4e0b\u4e00\u6b21\u6267\u884c\u3002\u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5\u901a\u5e38\u914d\u7f6e ",(0,s.jsx)(r.strong,{children:"\u91cd\u8bd5\u7b56\u7565"})," \u786e\u4fdd\u6bcf\u6b21\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u53ef\u80fd\u6267\u884c\u6210\u529f\uff0c\u5982\u91cd\u8bd5 ",(0,s.jsx)(r.code,{children:"3"})," \u6b21\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4}",children:"services.AddSchedule(options =>\r\n{\r\n options.AddJob<MyJob>(Triggers.PeriodSeconds(3)\r\n .SetNumRetries(3)); // \u91cd\u8bd5\u4e09\u6b21\r\n});\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u8f93\u51fa\u65e5\u5fd7\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {11-23}",children:"info: 2023-04-22 22:25:00.7244392 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2023-04-22 22:25:00.7293195 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2023-04-22 22:25:00.8796238 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2023-04-22 22:25:00.8852651 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2023-04-22 22:25:00.9348100 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2023-04-22 22:25:03.9357047 +08:00 \u661f\u671f\u516d L MyJob[0] #12\r\n <job1> [C] <job1 job1_trigger1> 3s 1ts 2023-04-22 22:25:03.840 -> 2023-04-22 22:25:06.888\r\nwarn: 2023-04-22 22:25:04.0147234 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #12\r\n Retrying 1/3 times for <job1> [C] <job1 job1_trigger1> 3s 1ts 2023-04-22 22:25:03.840 -> 2023-04-22 22:25:06.888\r\ninfo: 2023-04-22 22:25:05.0243650 +08:00 \u661f\u671f\u516d L MyJob[0] #12\r\n <job1> [C] <job1 job1_trigger1> 3s 1ts 2023-04-22 22:25:03.840 -> 2023-04-22 22:25:06.888\r\nwarn: 2023-04-22 22:25:05.0963359 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #12\r\n Retrying 2/3 times for <job1> [C] <job1 job1_trigger1> 3s 1ts 2023-04-22 22:25:03.840 -> 2023-04-22 22:25:06.888\r\ninfo: 2023-04-22 22:25:06.1100662 +08:00 \u661f\u671f\u516d L MyJob[0] #12\r\n <job1> [C] <job1 job1_trigger1> 3s 1ts 2023-04-22 22:25:03.840 -> 2023-04-22 22:25:06.888\r\nwarn: 2023-04-22 22:25:06.1785087 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #12\r\n Retrying 3/3 times for <job1> [C] <job1 job1_trigger1> 3s 1ts 2023-04-22 22:25:03.840 -> 2023-04-22 22:25:06.888\r\nfail: 2023-04-22 22:25:07.3754596 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #16\r\n Error occurred executing <job1> [C] <job1 job1_trigger1> 3s 2ts 2023-04-22 22:25:03.840 -> 2023-04-22 22:25:09.884.\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.DivideByZeroException: Attempted to divide by zero.\r\n at MyJob.ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) in C:\\Users\\MonkSoul\\source\\repos\\ConsoleApp3\\Program.cs:line 30\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_3.<<BackgroundProcessing>b__3>d.MoveNext() in C:\\Workplaces\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 233\r\n --- End of stack trace from previous location ---\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in C:\\Workplaces\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 91\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in C:\\Workplaces\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 102\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_2.<<BackgroundProcessing>b__2>d.MoveNext() in C:\\Workplaces\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 231\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"})}),"\n",(0,s.jsxs)(r.admonition,{type:"tip",children:[(0,s.jsxs)(r.mdxAdmonitionTitle,{children:["\u5168\u5c40\u914d\u7f6e",(0,s.jsx)(r.strong,{children:"\u91cd\u8bd5\u7b56\u7565"})]}),(0,s.jsxs)(r.p,{children:["\u63a8\u8350\u4f7f\u7528 ",(0,s.jsxs)(r.a,{href:"./job#2619-%E4%BD%9C%E4%B8%9A%E6%89%A7%E8%A1%8C%E5%99%A8-ijobexecutor",children:["\u301026.1.9 \u4f5c\u4e1a\u6267\u884c\u5668 ",(0,s.jsx)(r.code,{children:"IJobExecutor"}),"\u3011"]})," \u914d\u7f6e\u5168\u5c40\u5f02\u5e38\u91cd\u8bd5\u7b56\u7565\u3002"]})]}),"\n",(0,s.jsx)(r.h3,{id:"26148-\u4f5c\u4e1a\u6267\u884c\u5f02\u5e38\u56de\u9000\u7b56\u7565",children:"26.1.4.8 \u4f5c\u4e1a\u6267\u884c\u5f02\u5e38\u56de\u9000\u7b56\u7565"}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.8.6 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u6267\u884c\u5f02\u5e38\u9664\u4e86\u914d\u7f6e ",(0,s.jsx)(r.code,{children:"\u91cd\u8bd5\u6b21\u6570"})," \u6216\u914d\u7f6e ",(0,s.jsx)(r.code,{children:"\u5168\u5c40\u5f02\u5e38\u91cd\u8bd5\u7b56\u7565"})," \u4ee5\u5916\uff0c\u8fd8\u53ef\u4ee5\u5b9e\u73b0 ",(0,s.jsx)(r.code,{children:"IJob.FallbackAsync"})," \u8fdb\u884c\u56de\u9000\u914d\u7f6e\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {13-17,22,24}",children:'public class TestJob : IJob\r\n{\r\n private readonly ILogger<TestJob> _logger;\r\n public TestJob(ILogger<TestJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogWarning($"{context}");\r\n\r\n // \u6a21\u62df\u8fd0\u884c\u7b2c\u4e09\u6b21\u51fa\u5f02\u5e38\r\n if (context.Trigger.NumberOfRuns == 3)\r\n {\r\n throw new Exception("\u5047\u88c5\u51fa\u9519");\r\n }\r\n\r\n await Task.CompletedTask;\r\n }\r\n\r\n public Task FallbackAsync(JobExecutedContext context, CancellationToken stoppingToken)\r\n {\r\n Console.WriteLine("\u8c03\u7528\u4e86\u56de\u9000");\r\n return Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u8f93\u51fa\u65e5\u5fd7\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {22,30-31}",children:"info: 2023-04-25 17:19:06.5448438 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2023-04-25 17:19:06.5523770 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2023-04-25 17:19:07.1156318 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2023-04-25 17:19:07.1293994 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger2> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2023-04-25 17:19:07.1360332 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2023-04-25 17:19:07.1614880 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\nwarn: 2023-04-25 17:19:11.1565118 +08:00 \u661f\u671f\u4e8c L Furion.Application.TestJob[0] #9\r\n <job1> [C] <job1 job1_trigger2> 4s 1ts 2023-04-25 17:19:11.067 -> 2023-04-25 17:19:15.092\r\nwarn: 2023-04-25 17:19:15.1275434 +08:00 \u661f\u671f\u4e8c L Furion.Application.TestJob[0] #18\r\n <job1> [C] <job1 job1_trigger2> 4s 2ts 2023-04-25 17:19:15.092 -> 2023-04-25 17:19:19.094\r\nwarn: 2023-04-25 17:19:19.1006636 +08:00 \u661f\u671f\u4e8c L Furion.Application.TestJob[0] #17\r\n <job1> [C] <job1 job1_trigger2> 4s 3ts 2023-04-25 17:19:19.094 -> 2023-04-25 17:19:23.067\r\nfail: 2023-04-25 17:19:19.2554424 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #17\r\n Error occurred executing in <job1> [C] <job1 job1_trigger2> 4s 3ts 2023-04-25 17:19:19.094 -> 2023-04-25 17:19:23.067.\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.Exception: \u5047\u88c5\u51fa\u9519\r\n at Furion.Application.TestJob.ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) in D:\\Workplaces\\OpenSources\\Furion\\samples\\Furion.Application\\TestJob.cs:line 22\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_3.<<BackgroundProcessing>b__3>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 233\r\n --- End of stack trace from previous location ---\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 79\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_2.<<BackgroundProcessing>b__2>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 231\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\ninfo: 2023-04-25 17:19:19.2589045 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #17\r\n Fallback called in <job1> [C] <job1 job1_trigger2> 4s 3ts 2023-04-25 17:19:19.094 -> 2023-04-25 17:19:23.067.\r\n\u8c03\u7528\u4e86\u56de\u9000\r\nwarn: 2023-04-25 17:19:23.0840895 +08:00 \u661f\u671f\u4e8c L Furion.Application.TestJob[0] #14\r\n <job1> [C] <job1 job1_trigger2> 4s 4ts 2023-04-25 17:19:23.067 -> 2023-04-25 17:19:27.050\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u679c ",(0,s.jsx)(r.code,{children:"FallbackAsync"})," \u53d1\u751f\u4e8c\u6b21\u5f02\u5e38\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,5}",children:'public Task FallbackAsync(JobExecutedContext context, CancellationToken stoppingToken)\r\n{\r\n Console.WriteLine("\u8c03\u7528\u4e86\u56de\u9000");\r\n\r\n throw new Exception("\u56de\u9000\u4e86\u6211\u8fd8\u662f\u51fa\u5f02\u5e38~");\r\n return Task.CompletedTask;\r\n}\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u8f93\u51fa\u65e5\u5fd7\u5c06\u5408\u5e76\u524d\u9762\u6240\u6709\u5f02\u5e38\u5e76\u8f93\u51fa\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {30-31,33,37,45}",children:"info: 2023-04-25 17:24:46.0348224 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2023-04-25 17:24:46.0392736 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2023-04-25 17:24:46.4677115 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2023-04-25 17:24:46.4847108 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger2> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2023-04-25 17:24:46.4936590 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2023-04-25 17:24:46.6097957 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\nwarn: 2023-04-25 17:24:50.4988840 +08:00 \u661f\u671f\u4e8c L Furion.Application.TestJob[0] #17\r\n <job1> [C] <job1 job1_trigger2> 4s 1ts 2023-04-25 17:24:50.419 -> 2023-04-25 17:24:54.436\r\nwarn: 2023-04-25 17:24:54.4704187 +08:00 \u661f\u671f\u4e8c L Furion.Application.TestJob[0] #15\r\n <job1> [C] <job1 job1_trigger2> 4s 2ts 2023-04-25 17:24:54.436 -> 2023-04-25 17:24:58.436\r\nwarn: 2023-04-25 17:24:58.4441477 +08:00 \u661f\u671f\u4e8c L Furion.Application.TestJob[0] #15\r\n <job1> [C] <job1 job1_trigger2> 4s 3ts 2023-04-25 17:24:58.436 -> 2023-04-25 17:25:02.411\r\nfail: 2023-04-25 17:24:58.5704807 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #15\r\n Error occurred executing in <job1> [C] <job1 job1_trigger2> 4s 3ts 2023-04-25 17:24:58.436 -> 2023-04-25 17:25:02.411.\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.Exception: \u5047\u88c5\u51fa\u9519\r\n at Furion.Application.TestJob.ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) in D:\\Workplaces\\OpenSources\\Furion\\samples\\Furion.Application\\TestJob.cs:line 22\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_3.<<BackgroundProcessing>b__3>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 233\r\n --- End of stack trace from previous location ---\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 79\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_2.<<BackgroundProcessing>b__2>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 231\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\ninfo: 2023-04-25 17:24:58.5737508 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #15\r\n Fallback called in <job1> [C] <job1 job1_trigger2> 4s 3ts 2023-04-25 17:24:58.436 -> 2023-04-25 17:25:02.411.\r\n\u8c03\u7528\u4e86\u56de\u9000\r\nfail: 2023-04-25 17:24:58.5929688 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #15\r\n Fallback called error in <job1> [C] <job1 job1_trigger2> 4s 3ts 2023-04-25 17:24:58.436 -> 2023-04-25 17:25:02.411.\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.AggregateException: One or more errors occurred. (Error occurred executing in <job1> [C] <job1 job1_trigger2> 4s 3ts 2023-04-25 17:24:58.436 -> 2023-04-25 17:25:02.411.) (\u56de\u9000\u4e86\u6211\u8fd8\u662f\u51fa\u5f02\u5e38~)\r\n ---\x3e System.InvalidOperationException: Error occurred executing in <job1> [C] <job1 job1_trigger2> 4s 3ts 2023-04-25 17:24:58.436 -> 2023-04-25 17:25:02.411.\r\n ---\x3e System.Exception: \u5047\u88c5\u51fa\u9519\r\n at Furion.Application.TestJob.ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) in D:\\Workplaces\\OpenSources\\Furion\\samples\\Furion.Application\\TestJob.cs:line 22\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_3.<<BackgroundProcessing>b__3>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 233\r\n --- End of stack trace from previous location ---\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 79\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_2.<<BackgroundProcessing>b__2>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 231\r\n --- End of inner exception stack trace ---\r\n --- End of inner exception stack trace ---\r\n ---\x3e (Inner Exception #1) System.Exception: \u56de\u9000\u4e86\u6211\u8fd8\u662f\u51fa\u5f02\u5e38~\r\n at Furion.Application.TestJob.FallbackAsync(JobExecutedContext context, CancellationToken stoppingToken) in D:\\Workplaces\\OpenSources\\Furion\\samples\\Furion.Application\\TestJob.cs:line 32\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass24_2.<<BackgroundProcessing>b__2>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 309<---\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\nwarn: 2023-04-25 17:25:02.4212180 +08:00 \u661f\u671f\u4e8c L Furion.Application.TestJob[0] #15\r\n <job1> [C] <job1 job1_trigger2> 4s 4ts 2023-04-25 17:25:02.411 -> 2023-04-25 17:25:06.388\n"})}),"\n",(0,s.jsx)(r.h3,{id:"26149-\u4f5c\u4e1a\u8c03\u5ea6\u5668\u88ab\u53d6\u6d88\u5904\u7406",children:"26.1.4.9 \u4f5c\u4e1a\u8c03\u5ea6\u5668\u88ab\u53d6\u6d88\u5904\u7406"}),"\n",(0,s.jsx)(r.p,{children:"\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u4f5c\u4e1a\u8c03\u5ea6\u5668\u610f\u5916\u5173\u95ed\u6216\u624b\u52a8\u5173\u95ed\uff0c\u4f46\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u5f02\u6b65\u64cd\u4f5c\u8fd8\u672a\u5904\u7406\u5b8c\u6210\uff0c\u8fd9\u4e2a\u65f6\u5019\u6211\u4eec\u53ef\u4ee5\u9009\u62e9\u53d6\u6d88\u8fd8\u662f\u7ee7\u7eed\u6267\u884c\uff0c\u5982\u679c\u9009\u62e9\u53d6\u6d88\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {15,19,23,31}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context}");\r\n\r\n try\r\n {\r\n await SomeMethodAsync(stoppingToken);\r\n }\r\n catch (TaskCanceledException)\r\n {\r\n _logger.LogWarning("\u4f5c\u4e1a\u88ab\u53d6\u6d88\u4e86~");\r\n }\r\n catch (AggregateException ex) when (ex.InnerExceptions.Count == 1 && ex.InnerExceptions[0] is TaskCanceledException)\r\n {\r\n _logger.LogWarning("\u4f5c\u4e1a\u88ab\u53d6\u6d88\u4e86~");\r\n }\r\n catch {}\r\n }\r\n\r\n private async Task SomeMethodAsync(CancellationToken stoppingToken)\r\n {\r\n // \u6a21\u62df\u8017\u65f6\r\n await Task.Delay(1000 * 60 * 60, stoppingToken);\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.p,{children:["\u8fd9\u6837\u5f53\u4f5c\u4e1a\u8c03\u5ea6\u5668\u88ab\u5173\u95ed\u65f6\uff0c",(0,s.jsx)(r.code,{children:"SomeMethodAsync"})," \u5982\u679c\u672a\u5904\u7406\u5b8c\u6210\u4e5f\u4f1a\u53d6\u6d88\u64cd\u4f5c\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {14,16,18,20}",children:"info: 2022-12-04 12:49:00.2636929 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-04 12:49:00.2686096 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-04 12:49:00.4252737 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-04 12:49:00.4266075 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-04 12:49:00.4468654 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-04 12:49:05.4397629 +08:00 \u661f\u671f\u65e5 L MyJob[0] #4\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-04 12:49:05.390 -> 2022-12-04 12:49:10.393\r\ninfo: 2022-12-04 12:49:08.6301592 +08:00 \u661f\u671f\u65e5 L Microsoft.Hosting.Lifetime[0] #14\r\n Application is shutting down...\r\nwarn: 2022-12-04 12:49:08.7247004 +08:00 \u661f\u671f\u65e5 L MyJob[0] #6\r\n \u4f5c\u4e1a\u88ab\u53d6\u6d88\u4e86~\r\nwarn: 2022-12-04 12:49:10.4257861 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #6\r\n Schedule hosted service cancels hibernation and GC.Collect().\r\ncrit: 2022-12-04 12:49:10.4360088 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #6\r\n Schedule hosted service is stopped.\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"261410-http-\u8bf7\u6c42\u4f5c\u4e1a",children:["26.1.4.10 ",(0,s.jsx)(r.code,{children:"HTTP"})," \u8bf7\u6c42\u4f5c\u4e1a"]}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.7.7 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"HTTP"})," \u8bf7\u6c42\u4f5c\u4e1a\u901a\u5e38\u7528\u4e8e\u5b9a\u65f6\u8bf7\u6c42/\u8bbf\u95ee\u4e92\u8054\u7f51\u5730\u5740\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:'services.AddSchedule(options =>\r\n{\r\n options.AddHttpJob(request =>\r\n {\r\n request.RequestUri = "https://www.chinadot.net";\r\n request.HttpMethod = HttpMethod.Get;\r\n // request.Body = "{}"; // \u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u4f53\r\n // request.Headers.Add("framework", "Furion"); // Furion 4.8.8.46+ \u652f\u6301\r\n // request.GroupName = "group"; // Furion 4.8.8.46+ \u652f\u6301\r\n // request.Description = "\u4f5c\u4e1a\u8bf7\u6c42\u63cf\u8ff0"; // Furion 4.8.8.46+ \u652f\u6301\r\n }, Triggers.PeriodSeconds(5));\r\n});\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u4f5c\u4e1a\u6267\u884c\u65e5\u5fd7\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {13-26}",children:"info: 2023-03-11 11:05:36.3616747 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2023-03-11 11:05:36.3652411 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2023-03-11 11:05:36.5172940 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2023-03-11 11:05:36.5189296 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2023-03-11 11:05:36.5347816 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\nwarn: 2023-03-11 11:05:41.5228138 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #15\r\n Schedule hosted service will sleep <4970> milliseconds and be waked up at <2023-03-11 11:05:46.486>.\r\ninfo: 2023-03-11 11:05:41.5542865 +08:00 \u661f\u671f\u516d L System.Net.Http.HttpClient.HttpJob.LogicalHandler[100] #9\r\n Start processing HTTP request GET https://www.chinadot.net/\r\ninfo: 2023-03-11 11:05:41.5589056 +08:00 \u661f\u671f\u516d L System.Net.Http.HttpClient.HttpJob.ClientHandler[100] #9\r\n Sending HTTP request GET https://www.chinadot.net/\r\ninfo: 2023-03-11 11:05:44.1305461 +08:00 \u661f\u671f\u516d L System.Net.Http.HttpClient.HttpJob.ClientHandler[101] #8\r\n Received HTTP response headers after 2566.7836ms - 200\r\ninfo: 2023-03-11 11:05:44.1343977 +08:00 \u661f\u671f\u516d L System.Net.Http.HttpClient.HttpJob.LogicalHandler[101] #8\r\n End processing HTTP request after 2584.2327ms - 200\r\ninfo: 2023-03-11 11:05:48.6475959 +08:00 \u661f\u671f\u516d L System.Logging.ScheduleService[0] #4\r\n Received HTTP response body with a length of <63639> output as follows - 200\r\n <!DOCTYPE html><html><head>\r\n <title>dotNET China | \u8ba9 .NET \u5f00\u53d1\u66f4\u7b80\u5355\uff0c\u66f4\u901a\u7528\uff0c\u66f4\u6d41\u884c</title>\r\n ......\r\n </body></html>\n"})}),"\n",(0,s.jsx)(r.hr,{}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsxs)(r.strong,{children:["\u2764\ufe0f \u5982\u4f55\u81ea\u5b9a\u4e49 ",(0,s.jsx)(r.code,{children:"HTTP"})," \u4f5c\u4e1a"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",(0,s.jsx)(r.code,{children:"Furion"})," \u6846\u67b6\u63d0\u4f9b\u6709\u9650\u7684 ",(0,s.jsx)(r.code,{children:"HTTP"})," \u914d\u7f6e\u53c2\u6570\uff0c\u5982\u679c\u4e0d\u80fd\u6ee1\u8db3\u53ef\u81ea\u884c\u5b9a\u4e49\u3002"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\u81ea\u5b9a\u4e49 ",(0,s.jsx)(r.code,{children:"Http"})," \u53c2\u6570\u7c7b\uff1a",(0,s.jsx)(r.code,{children:"MyHttpJobMessage"})]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {6}",children:"namespace YourProject.Core;\r\n\r\n/// <summary>\r\n/// HTTP \u4f5c\u4e1a\u6d88\u606f\r\n/// </summary>\r\npublic class MyHttpJobMessage\r\n{\r\n /// <summary>\r\n /// \u8bf7\u6c42\u5730\u5740\r\n /// </summary>\r\n public string RequestUri { get; set; }\r\n\r\n /// <summary>\r\n /// \u8bf7\u6c42\u65b9\u6cd5\r\n /// </summary>\r\n public HttpMethod HttpMethod { get; set; } = HttpMethod.Get;\r\n\r\n /// <summary>\r\n /// \u8bf7\u6c42\u62a5\u6587\u4f53\r\n /// </summary>\r\n public string Body { get; set; }\r\n}\n"})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsxs)(r.li,{children:["\u81ea\u5b9a\u4e49 ",(0,s.jsx)(r.code,{children:"Http"})," \u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\uff1a",(0,s.jsx)(r.code,{children:"MyHttpJob"})]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4,9,39,48,66-67,70,73,79}",children:'/// <summary>\r\n/// HTTP \u8bf7\u6c42\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\r\n/// </summary>\r\npublic class MyHttpJob : IJob // \u4e5f\u53ef\u4ee5\u7ee7\u627f\u5185\u90e8\u7684 HttpJob \u7c7b\r\n{\r\n /// <summary>\r\n /// <see cref="HttpClient"/> \u521b\u5efa\u5de5\u5382\r\n /// </summary>\r\n private readonly IHttpClientFactory _httpClientFactory;\r\n\r\n /// <summary>\r\n /// \u65e5\u5fd7\u670d\u52a1\r\n /// </summary>\r\n private readonly ILogger<MyHttpJob> _logger;\r\n\r\n /// <summary>\r\n /// \u6784\u9020\u51fd\u6570\r\n /// </summary>\r\n /// <param name="httpClientFactory"><see cref="HttpClient"/> \u521b\u5efa\u5de5\u5382</param>\r\n /// <param name="logger">\u65e5\u5fd7\u670d\u52a1</param>\r\n public MyHttpJob(IHttpClientFactory httpClientFactory\r\n , ILogger<MyHttpJob> logger)\r\n {\r\n _httpClientFactory = httpClientFactory;\r\n _logger = logger;\r\n }\r\n\r\n /// <summary>\r\n /// \u5177\u4f53\u5904\u7406\u903b\u8f91\r\n /// </summary>\r\n /// <param name="context">\u4f5c\u4e1a\u6267\u884c\u524d\u4e0a\u4e0b\u6587</param>\r\n /// <param name="stoppingToken">\u53d6\u6d88\u4efb\u52a1 Token</param>\r\n /// <returns><see cref="Task"/></returns>\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n var jobDetail = context.JobDetail;\r\n\r\n // \u89e3\u6790 HTTP \u8bf7\u6c42\u53c2\u6570\uff0c\u952e\u540d\u79f0\u4e3a\u7c7b\u540d\r\n var httpJobMessage = Penetrates.Deserialize<MyHttpJobMessage>(jobDetail.GetProperty<string>(nameof(MyHttpJob)));\r\n\r\n // \u7a7a\u68c0\u67e5\r\n if (httpJobMessage == null || string.IsNullOrWhiteSpace(httpJobMessage.RequestUri))\r\n {\r\n return;\r\n }\r\n\r\n // \u521b\u5efa\u8bf7\u6c42\u5ba2\u6237\u7aef\r\n using var httpClient = _httpClientFactory.CreateClient(); // CreateClient \u53ef\u4ee5\u4f20\u5165\u4e00\u4e2a\u5b57\u7b26\u4e32\u8fdb\u884c\u5168\u5c40\u914d\u7f6e Client\r\n\r\n // \u6dfb\u52a0\u8bf7\u6c42\u62a5\u6587\u5934 User-Agent\r\n httpClient.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.47");\r\n\r\n // \u521b\u5efa\u8bf7\u6c42\u5bf9\u8c61\r\n var httpRequestMessage = new HttpRequestMessage(httpJobMessage.HttpMethod, httpJobMessage.RequestUri);\r\n\r\n // \u6dfb\u52a0\u8bf7\u6c42\u62a5\u6587\u4f53\uff0c\u9ed8\u8ba4\u53ea\u652f\u6301\u53d1\u9001 application/json \u7c7b\u578b\r\n if (httpJobMessage.HttpMethod != HttpMethod.Get\r\n && httpJobMessage.HttpMethod != HttpMethod.Head\r\n && !string.IsNullOrWhiteSpace(httpJobMessage.Body))\r\n {\r\n var stringContent = new StringContent(httpJobMessage.Body, Encoding.UTF8);\r\n stringContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");\r\n httpRequestMessage.Content = stringContent;\r\n }\r\n\r\n // \u66f4\u591a\u81ea\u5b9a\u4e49\u53c2\u6570========================\r\n // Your Code ....\r\n\r\n // \u53d1\u9001\u8bf7\u6c42\u5e76\u786e\u4fdd\u6210\u529f\r\n var httpResponseMessage = await httpClient.SendAsync(httpRequestMessage, stoppingToken);\r\n\r\n // \u89e3\u6790\u8fd4\u56de\u503c\r\n var bodyString = await httpResponseMessage.Content.ReadAsStringAsync(stoppingToken);\r\n\r\n // \u8f93\u51fa\u65e5\u5fd7\r\n _logger.LogInformation($"Received HTTP response body with a length of <{bodyString.Length}> output as follows - {(int)httpResponseMessage.StatusCode}{Environment.NewLine}{bodyString}");\r\n\r\n // \u8bbe\u7f6e\u672c\u6b21\u6267\u884c\u7ed3\u679c\r\n context.Result = Penetrates.Serialize(new\r\n {\r\n httpResponseMessage.StatusCode,\r\n Body = bodyString\r\n });\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"3",children:["\n",(0,s.jsxs)(r.li,{children:["\u6ce8\u518c\u81ea\u5b9a\u4e49 ",(0,s.jsx)(r.code,{children:"Http"})," \u4f5c\u4e1a"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4-7}",children:"services.AddSchedule(options =>\r\n{\r\n // \u521b\u5efa HTTP \u4f5c\u4e1a\u6d88\u606f\r\n var httpJobMessage = new YourHttpJobMessage();\r\n var jobBuilder = JobBuilder.Create<MyHttpJob>()\r\n // \u6dfb\u52a0\u4f5c\u4e1a\u9644\u52a0\u4fe1\u606f\r\n .AddProperty(nameof(MyHttpJob), Schedular.Serialize(httpJobMessage));\r\n // \u6dfb\u52a0\u4f5c\u4e1a\r\n options.AddJob(jobBuilder, Triggers.PeriodSeconds(5));\r\n});\n"})}),"\n",(0,s.jsx)(r.h3,{id:"261411-\u8bbe\u7f6e\u672c\u6b21\u6267\u884c\u7ed3\u679c",children:"26.1.4.11 \u8bbe\u7f6e\u672c\u6b21\u6267\u884c\u7ed3\u679c"}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.7.7 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u6709\u65f6\u5019\u6211\u4eec\u5e0c\u671b\u80fd\u591f\u8bb0\u5f55\u672c\u6b21\u4f5c\u4e1a\u89e6\u53d1\u5668\u89e6\u53d1\u8fd4\u56de\u7ed3\u679c\uff0c\u53ef\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"context.Result"})," \u8fdb\u884c\u8bbe\u7f6e\u3002"]}),"\n",(0,s.jsxs)(r.p,{children:["\u4e5f\u53ef\u4ee5\u901a\u8fc7\u8be5\u503c\u6765\u5224\u65ad\u4f5c\u4e1a\u662f\u5426\u6210\u529f\u6267\u884c\uff0c\u5982\u8bbe\u7f6e\u4e86 ",(0,s.jsx)(r.code,{children:"Result"})," \u503c\u4f46\u5b9e\u9645\u53d1\u73b0 ",(0,s.jsx)(r.code,{children:"trigger.Result"})," \u4e3a ",(0,s.jsx)(r.code,{children:"null"}),"\uff0c\u90a3\u4e48\u4e5f\u5c31\u662f\u672c\u6b21\u6267\u884c\u672a\u6210\u529f\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers{13}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context}");\r\n\r\n context.Result = "\u8bbe\u7f6e\u672c\u6b21\u6267\u884c\u7684\u503c";\r\n return Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.admonition,{type:"note",children:[(0,s.jsxs)(r.mdxAdmonitionTitle,{children:[(0,s.jsx)(r.code,{children:"Result"})," \u548c ",(0,s.jsx)(r.code,{children:"Properties"})]}),(0,s.jsxs)(r.p,{children:["\u9664\u4e86\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"context.Result"})," \u8bbe\u7f6e\u4f5c\u4e1a\u672c\u6b21\u6267\u884c\u7ed3\u679c\u4ee5\u5916\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"jobDetail.AddOrUpdateProperty(key, value)"})," \u7684\u65b9\u5f0f\u8bbe\u7f6e\u3002\u533a\u522b\u5728\u4e8e\u524d\u8005\u4f1a\u5c06\u503c\u540c\u6b65\u5230 ",(0,s.jsx)(r.code,{children:"Trigger"})," \u7684 ",(0,s.jsx)(r.code,{children:"Result"})," \u4e2d\uff0c\u540e\u8005\u4f1a\u5c06\u503c\u540c\u6b65\u5728 ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u7684 ",(0,s.jsx)(r.code,{children:"Properties"})," \u4e2d\u3002"]})]}),"\n",(0,s.jsxs)(r.h2,{id:"2615-\u4f5c\u4e1a\u89e6\u53d1\u5668-trigger-\u53ca\u6784\u5efa\u5668",children:["26.1.5 \u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Trigger"})," \u53ca\u6784\u5efa\u5668"]}),"\n",(0,s.jsx)(r.h3,{id:"26151-\u5173\u4e8e\u4f5c\u4e1a\u89e6\u53d1\u5668",children:"26.1.5.1 \u5173\u4e8e\u4f5c\u4e1a\u89e6\u53d1\u5668"}),"\n",(0,s.jsxs)(r.p,{children:["\u6846\u67b6\u63d0\u4f9b\u4e86 ",(0,s.jsx)(r.code,{children:"Trigger"})," \u7c7b\u578b\u6765\u63cf\u8ff0\u4f5c\u4e1a\u5177\u4f53\u7684\u89e6\u53d1\u65f6\u95f4\uff0c",(0,s.jsx)(r.code,{children:"Trigger"})," \u7c7b\u578b\u63d0\u4f9b\u4ee5\u4e0b",(0,s.jsx)(r.strong,{children:"\u53ea\u8bfb\u5c5e\u6027"}),"\uff1a"]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"\u5c5e\u6027\u540d"}),(0,s.jsx)(r.th,{children:"\u5c5e\u6027\u7c7b\u578b"}),(0,s.jsx)(r.th,{children:"\u9ed8\u8ba4\u503c"}),(0,s.jsx)(r.th,{children:"\u8bf4\u660e"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"TriggerId"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsxs)(r.td,{children:["\u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Id"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"JobId"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsxs)(r.td,{children:["\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"Id"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"TriggerType"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsxs)(r.td,{children:["\u4f5c\u4e1a\u89e6\u53d1\u5668\u7c7b\u578b\uff0c\u5b58\u50a8\u7684\u662f\u7c7b\u578b\u7684 ",(0,s.jsx)(r.code,{children:"FullName"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"AssemblyName"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsxs)(r.td,{children:["\u4f5c\u4e1a\u89e6\u53d1\u5668\u7c7b\u578b\u6240\u5728\u7a0b\u5e8f\u96c6\uff0c\u5b58\u50a8\u7684\u662f\u7a0b\u5e8f\u96c6 ",(0,s.jsx)(r.code,{children:"Name"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Args"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsxs)(r.td,{children:["\u4f5c\u4e1a\u89e6\u53d1\u5668\u521d\u59cb\u5316\u53c2\u6570\uff0c\u8fd0\u884c\u65f6\u5c06\u53cd\u5e8f\u5217\u5316\u4e3a ",(0,s.jsx)(r.code,{children:"object[]"})," \u7c7b\u578b\u5e76\u4f5c\u4e3a\u6784\u9020\u51fd\u6570\u53c2\u6570"]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Description"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsx)(r.td,{children:"\u63cf\u8ff0\u4fe1\u606f"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Status"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"TriggerStatus"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Ready"})}),(0,s.jsx)(r.td,{children:"\u4f5c\u4e1a\u89e6\u53d1\u5668\u72b6\u6001"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"StartTime"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"DateTime?"})}),(0,s.jsx)(r.td,{}),(0,s.jsx)(r.td,{children:"\u8d77\u59cb\u65f6\u95f4"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"EndTime"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"DateTime?"})}),(0,s.jsx)(r.td,{}),(0,s.jsx)(r.td,{children:"\u7ed3\u675f\u65f6\u95f4"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"LastRunTime"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"DateTime?"})}),(0,s.jsx)(r.td,{}),(0,s.jsx)(r.td,{children:"\u6700\u8fd1\u8fd0\u884c\u65f6\u95f4"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"NextRunTime"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"DateTime?"})}),(0,s.jsx)(r.td,{}),(0,s.jsx)(r.td,{children:"\u4e0b\u4e00\u6b21\u8fd0\u884c\u65f6\u95f4"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"NumberOfRuns"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"long"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"0"})}),(0,s.jsx)(r.td,{children:"\u89e6\u53d1\u6b21\u6570"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"MaxNumberOfRuns"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"long"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"0"})}),(0,s.jsxs)(r.td,{children:["\u6700\u5927\u89e6\u53d1\u6b21\u6570\uff0c",(0,s.jsx)(r.code,{children:"0"}),"\uff1a\u4e0d\u9650\u5236\uff0c",(0,s.jsx)(r.code,{children:"n"}),"\uff1aN \u6b21"]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"NumberOfErrors"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"long"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"0"})}),(0,s.jsx)(r.td,{children:"\u51fa\u9519\u6b21\u6570"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"MaxNumberOfErrors"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"long"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"0"})}),(0,s.jsxs)(r.td,{children:["\u6700\u5927\u51fa\u9519\u6b21\u6570\uff0c",(0,s.jsx)(r.code,{children:"0"}),"\uff1a\u4e0d\u9650\u5236\uff0c",(0,s.jsx)(r.code,{children:"n"}),"\uff1aN \u6b21"]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"NumRetries"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"int"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"0"})}),(0,s.jsx)(r.td,{children:"\u91cd\u8bd5\u6b21\u6570"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"RetryTimeout"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"int"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"1000"})}),(0,s.jsx)(r.td,{children:"\u91cd\u8bd5\u95f4\u9694\u65f6\u95f4\uff0c\u6beb\u79d2\u5355\u4f4d"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"StartNow"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"bool"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"true"})}),(0,s.jsx)(r.td,{children:"\u662f\u5426\u7acb\u5373\u542f\u52a8"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"RunOnStart"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"bool"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"false"})}),(0,s.jsx)(r.td,{children:"\u662f\u5426\u542f\u52a8\u65f6\u6267\u884c\u4e00\u6b21"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"ResetOnlyOnce"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"bool"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"true"})}),(0,s.jsx)(r.td,{children:"\u662f\u5426\u5728\u542f\u52a8\u65f6\u91cd\u7f6e\u6700\u5927\u89e6\u53d1\u6b21\u6570\u7b49\u4e8e\u4e00\u6b21\u7684\u4f5c\u4e1a"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Result"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"string"})}),(0,s.jsx)(r.td,{}),(0,s.jsxs)(r.td,{children:["\u672c\u6b21\u6267\u884c\u8fd4\u56de\u7ed3\u679c\uff0c",(0,s.jsx)(r.code,{children:"Furion 4.8.7.7+"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"ElapsedTime"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"long"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"0"})}),(0,s.jsxs)(r.td,{children:["\u672c\u6b21\u6267\u884c\u8017\u65f6\uff0c\u5355\u4f4d ",(0,s.jsx)(r.code,{children:"ms"}),"\uff0c",(0,s.jsx)(r.code,{children:"Furion 4.8.7.7+"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"UpdatedTime"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"DateTime?"})}),(0,s.jsx)(r.td,{}),(0,s.jsx)(r.td,{children:"\u4f5c\u4e1a\u89e6\u53d1\u5668\u66f4\u65b0\u65f6\u95f4"})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"26152-\u4f5c\u4e1a\u89e6\u53d1\u5668\u72b6\u6001",children:"26.1.5.2 \u4f5c\u4e1a\u89e6\u53d1\u5668\u72b6\u6001"}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u89e6\u53d1\u5668\u72b6\u6001\u6307\u793a\u4e86\u5f53\u524d\u4f5c\u4e1a\u89e6\u53d1\u5668\u7684\u72b6\u6001\uff0c\u4f7f\u7528 ",(0,s.jsx)(r.code,{children:"TriggerStatus"})," \u679a\u4e3e\u7c7b\u578b\uff08",(0,s.jsx)(r.code,{children:"uint"}),"\uff09\uff0c\u8be5\u7c7b\u578b\u5305\u542b\u4ee5\u4e0b\u679a\u4e3e\u6210\u5458\u3002"]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"\u679a\u4e3e\u540d"}),(0,s.jsx)(r.th,{children:"\u679a\u4e3e\u503c"}),(0,s.jsx)(r.th,{children:"\u8bf4\u660e"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Backlog"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"0"})}),(0,s.jsx)(r.td,{children:"\u79ef\u538b\uff0c\u8d77\u59cb\u65f6\u95f4\u5927\u4e8e\u5f53\u524d\u65f6\u95f4"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Ready"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"1"})}),(0,s.jsx)(r.td,{children:"\u5c31\u7eea"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Running"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"2"})}),(0,s.jsx)(r.td,{children:"\u6b63\u5728\u8fd0\u884c"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Pause"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"3"})}),(0,s.jsx)(r.td,{children:"\u6682\u505c"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Blocked"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"4"})}),(0,s.jsx)(r.td,{children:"\u963b\u585e\uff0c\u672c\u8be5\u6267\u884c\u4f46\u662f\u6ca1\u6709\u6267\u884c"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"ErrorToReady"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"5"})}),(0,s.jsx)(r.td,{children:"\u7531\u5931\u8d25\u8fdb\u5165\u5c31\u7eea\uff0c\u8fd0\u884c\u9519\u8bef\u5f53\u5e76\u672a\u8d85\u51fa\u6700\u5927\u9519\u8bef\u6570\uff0c\u8fdb\u5165\u4e0b\u4e00\u8f6e\u5c31\u7eea"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Archived"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"6"})}),(0,s.jsx)(r.td,{children:"\u5f52\u6863\uff0c\u7ed3\u675f\u65f6\u95f4\u5c0f\u4e8e\u5f53\u524d\u65f6\u95f4"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Panic"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"7"})}),(0,s.jsx)(r.td,{children:"\u5d29\u6e83\uff0c\u9519\u8bef\u6b21\u6570\u8d85\u51fa\u4e86\u6700\u5927\u9519\u8bef\u6570"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Overrun"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"8"})}),(0,s.jsx)(r.td,{children:"\u8d85\u9650\uff0c\u8fd0\u884c\u6b21\u6570\u8d85\u51fa\u4e86\u6700\u5927\u9650\u5236"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Unoccupied"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"9"})}),(0,s.jsxs)(r.td,{children:["\u65e0\u89e6\u53d1\u65f6\u95f4\uff0c\u4e0b\u4e00\u6b21\u6267\u884c\u65f6\u95f4\u4e3a ",(0,s.jsx)(r.code,{children:"null"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"NotStart"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"10"})}),(0,s.jsx)(r.td,{children:"\u521d\u59cb\u5316\u65f6\u672a\u542f\u52a8"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Unknown"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"11"})}),(0,s.jsxs)(r.td,{children:["\u672a\u77e5\u4f5c\u4e1a\u89e6\u53d1\u5668\uff0c\u4f5c\u4e1a\u89e6\u53d1\u5668\u8fd0\u884c\u65f6\u7c7b\u578b\u4e3a ",(0,s.jsx)(r.code,{children:"null"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"Unhandled"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"12"})}),(0,s.jsxs)(r.td,{children:["\u672a\u77e5\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\uff0c\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u7c7b\u578b\u8fd0\u884c\u65f6\u7c7b\u578b\u4e3a ",(0,s.jsx)(r.code,{children:"null"})]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"26153-\u5173\u4e8e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668",children:"26.1.5.3 \u5173\u4e8e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668"}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Trigger"})," \u662f\u4f5c\u4e1a\u8c03\u5ea6\u6a21\u5757\u63d0\u4f9b\u8fd0\u884c\u65f6\u7684",(0,s.jsx)(r.strong,{children:"\u53ea\u8bfb\u7c7b\u578b"}),"\uff0c\u90a3\u4e48\u6211\u4eec\u8be5\u5982\u4f55\u521b\u5efa\u6216\u53d8\u66f4 ",(0,s.jsx)(r.code,{children:"Trigger"})," \u5bf9\u8c61\u5462\uff1f"]}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"TriggerBuilder"})," \u662f\u4f5c\u4e1a\u8c03\u5ea6\u6a21\u5757\u63d0\u4f9b\u53ef\u7528\u6765\u751f\u6210\u8fd0\u884c\u65f6 ",(0,s.jsx)(r.code,{children:"Trigger"})," \u7684\u7c7b\u578b\uff0c\u8fd9\u6837\u505a\u7684\u597d\u5904\u53ef\u907f\u514d\u5916\u90e8\u76f4\u63a5\u4fee\u6539\u8fd0\u884c\u65f6 ",(0,s.jsx)(r.code,{children:"Trigger"})," \u6570\u636e\uff0c\u8fd8\u80fd\u5b9e\u73b0\u4efb\u4f55\u4fee\u6539\u52a8\u4f5c\u76d1\u542c\uff0c\u4e5f\u80fd\u907f\u514d\u591a\u7ebf\u7a0b\u62a2\u5360\u60c5\u51b5\u3002"]}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u8c03\u5ea6\u6a21\u5757\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u5f0f\u7528\u6765\u521b\u5efa ",(0,s.jsx)(r.code,{children:"TriggerBuilder"})," \u5bf9\u8c61\u3002"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"Create"})," \u9759\u6001\u65b9\u6cd5\u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,5,8,11,14,17,20}",children:'// \u6839\u636e\u4f5c\u4e1a\u89e6\u53d1\u5668 Id \u521b\u5efa\r\nvar triggerBuilder = TriggerBuilder.Create("trigger1");\r\n\r\n// \u6839\u636e Trigger \u6d3e\u751f\u7c7b\u7c7b\u578b\u521b\u5efa\r\nvar triggerBuilder = TriggerBuilder.Create<PeriodTrigger>();\r\n\r\n// \u6839\u636e Trigger \u6d3e\u751f\u7c7b\u7c7b\u578b + \u6784\u9020\u51fd\u6570\u53c2\u6570\u521b\u5efa\r\nvar triggerBuilder = TriggerBuilder.Create<CronTrigger>("* * * * *", CronStringFormat.Default);\r\n\r\n// \u6839\u636e\u7a0b\u5e8f\u96c6\u540d\u79f0\u548c\u7c7b\u578b\u5b8c\u5168\u9650\u5b9a\u540d\uff08FullName\uff09\u521b\u5efa\r\nvar triggerBuilder = TriggerBuilder.Create("Furion", "Furion.Schedule.PeriodTrigger");\r\n\r\n// \u6839\u636e\u7a0b\u5e8f\u96c6\u540d\u79f0\u548c\u7c7b\u578b\u5b8c\u5168\u9650\u5b9a\u540d\uff08FullName\uff09 + \u6784\u9020\u51fd\u6570\u53c2\u6570\u521b\u5efa\r\nvar triggerBuilder = TriggerBuilder.Create("Furion", "Furion.Schedule.PeriodTrigger", 1000);\r\n\r\n// \u6839\u636e Type \u7c7b\u578b\u521b\u5efa\r\nvar triggerBuilder = TriggerBuilder.Create(typeof(PeriodTrigger));\r\n\r\n// \u6839\u636e Type \u7c7b\u578b + \u6784\u9020\u51fd\u6570\u53c2\u6570\u521b\u5efa\r\nvar triggerBuilder = TriggerBuilder.Create(typeof(CronTrigger), "* * * * *", CronStringFormat.Default);\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"Trigger"})," \u7c7b\u578b\u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsx)(r.p,{children:"\u8fd9\u79cd\u65b9\u5f0f\u5e38\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u66f4\u65b0\u4f5c\u4e1a\u89e6\u53d1\u5668\u3002"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var triggerBuilder = TriggerBuilder.From(trigger);\r\n\r\n//\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\r\nvar triggerBuilder = trigger.GetBuilder();\n"})}),"\n",(0,s.jsxs)(r.ol,{start:"3",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32\u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["\u8be5\u65b9\u5f0f\u975e\u5e38\u7075\u6d3b\uff0c\u53ef\u4ece\u914d\u7f6e\u6587\u4ef6\uff0c",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32\uff0c\u6216\u5176\u4ed6\u80fd\u591f\u8fd4\u56de ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32\u7684\u5730\u65b9\u521b\u5efa\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2-26}",children:'var triggerBuilder = Triggers.From(@"\r\n{\r\n\t""triggerId"": ""job1_trigger1"",\r\n\t""jobId"": ""job1"",\r\n\t""triggerType"": ""Furion.Schedule.CronTrigger"",\r\n\t""assemblyName"": ""Furion"",\r\n\t""args"": ""[\\""* * * * *\\"",0]"",\r\n\t""description"": null,\r\n\t""status"": 1,\r\n\t""startTime"": null,\r\n\t""endTime"": null,\r\n\t""lastRunTime"": ""2022-12-04 16:13:00.000"",\r\n\t""nextRunTime"": null,\r\n\t""numberOfRuns"": 1,\r\n\t""maxNumberOfRuns"": 0,\r\n\t""numberOfErrors"": 0,\r\n\t""maxNumberOfErrors"": 0,\r\n\t""numRetries"": 0,\r\n\t""retryTimeout"": 1000,\r\n\t""startNow"": true,\r\n\t""runOnStart"": false,\r\n\t""resetOnlyOnce"": true,\r\n\t""result"": null,\r\n\t""elapsedTime"": 100,\r\n\t""updatedTime"": ""2022-12-04 16:13:00.045""\r\n}");\n'})}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u679c\u4f7f\u7528\u7684\u662f ",(0,s.jsx)(r.code,{children:".NET7"}),"\uff0c\u53ef\u4f7f\u7528 ",(0,s.jsx)(r.code,{children:'"""'})," \u907f\u514d\u8f6c\u4e49\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2-26}",children:'var triggerBuilder = Triggers.From("""\r\n{\r\n "triggerId": "job1_trigger1",\r\n "jobId": "job1",\r\n "triggerType": "Furion.Schedule.CronTrigger",\r\n "assemblyName": "Furion",\r\n "args": "[\\"* * * * *\\",0]",\r\n "description": null,\r\n "status": 8,\r\n "startTime": null,\r\n "endTime": null,\r\n "lastRunTime": "2022-12-04 16:13:00.000",\r\n "nextRunTime": null,\r\n "numberOfRuns": 1,\r\n "maxNumberOfRuns": 0,\r\n "numberOfErrors": 0,\r\n "maxNumberOfErrors": 0,\r\n "numRetries": 0,\r\n "retryTimeout": 1000,\r\n "startNow": true,\r\n "runOnStart": false,\r\n "resetOnlyOnce": true,\r\n "result": null,\r\n "elapsedTime": 100,\r\n "updatedTime": "2022-12-04 16:13:00.045"\r\n}\r\n""");\n'})}),"\n",(0,s.jsxs)(r.admonition,{title:"\u5173\u4e8e\u5c5e\u6027\u540d\u5339\u914d\u89c4\u5219",type:"important",children:[(0,s.jsxs)(r.p,{children:["\u652f\u6301 ",(0,s.jsx)(r.code,{children:"CamelCase\uff08\u9a7c\u5cf0\u547d\u540d\u6cd5\uff09"}),"\uff0c",(0,s.jsx)(r.code,{children:"Pascal\uff08\u5e15\u65af\u5361\u547d\u540d\u6cd5\uff09"})," \u547d\u540d\u65b9\u5f0f\u3002"]}),(0,s.jsxs)(r.p,{children:[(0,s.jsxs)(r.strong,{children:["\u4e0d\u652f\u6301 ",(0,s.jsx)(r.code,{children:"UnderScoreCase\uff08\u4e0b\u5212\u7ebf\u547d\u540d\u6cd5\uff09"})]})," \uff0c\u5982 ",(0,s.jsx)(r.code,{children:'"include_annotations": true'})]})]}),"\n",(0,s.jsxs)(r.ol,{start:"4",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8fd8\u53ef\u4ee5\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"Clone"})," \u9759\u6001\u65b9\u6cd5\u4ece\u4e00\u4e2a ",(0,s.jsx)(r.code,{children:"TriggerBuilder"})," \u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var triggerBuilder = TriggerBuilder.Clone(fromTriggerBuilder);\n"})}),"\n",(0,s.jsxs)(r.admonition,{title:"\u514b\u9686\u8bf4\u660e",type:"important",children:[(0,s.jsxs)(r.p,{children:["\u514b\u9686\u64cd\u4f5c\u53ea\u4f1a\u514b\u9686 ",(0,s.jsx)(r.code,{children:"AssemblyName"}),"\uff0c",(0,s.jsx)(r.code,{children:"TriggerType"}),"\uff0c",(0,s.jsx)(r.code,{children:"Args"}),"\uff0c",(0,s.jsx)(r.code,{children:"Description"}),"\uff0c",(0,s.jsx)(r.code,{children:"StartTime"}),"\uff0c",(0,s.jsx)(r.code,{children:"EndTime"}),"\uff0c",(0,s.jsx)(r.code,{children:"MaxNumberOfRuns"}),"\uff0c",(0,s.jsx)(r.code,{children:"MaxNumberOfErrors"}),"\uff0c",(0,s.jsx)(r.code,{children:"NumRetries"}),"\uff0c",(0,s.jsx)(r.code,{children:"RetryTimeout"}),"\uff0c",(0,s.jsx)(r.code,{children:"StartNow"}),"\uff0c",(0,s.jsx)(r.code,{children:"RunOnStart"}),"\uff0c",(0,s.jsx)(r.code,{children:"ResetOnlyOnce"}),"\u3002"]}),(0,s.jsx)(r.p,{children:(0,s.jsxs)(r.strong,{children:["\u4e0d\u4f1a\u514b\u9686 ",(0,s.jsx)(r.code,{children:"TriggerId"}),"\uff0c",(0,s.jsx)(r.code,{children:"JobId"}),"\uff0c",(0,s.jsx)(r.code,{children:"Status"}),"\uff0c",(0,s.jsx)(r.code,{children:"LastRunTime"}),"\uff0c",(0,s.jsx)(r.code,{children:"NextRunTime"}),"\uff0c",(0,s.jsx)(r.code,{children:"NumberOfRuns"}),"\uff0c",(0,s.jsx)(r.code,{children:"NumberOfErrors"}),"\uff0c",(0,s.jsx)(r.code,{children:"Result"}),"\uff0c",(0,s.jsx)(r.code,{children:"ElapsedTime"}),"\uff0cPersistentConnection",(0,s.jsx)(r.code,{children:"UpdatedTime"}),"\u3002"]})})]}),"\n",(0,s.jsxs)(r.ol,{start:"5",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8fd8\u53ef\u4ee5\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"LoadFrom"})," \u5b9e\u4f8b\u65b9\u6cd5\u586b\u5145\u5f53\u524d\u7684 ",(0,s.jsx)(r.code,{children:"TriggerBuilder"})]})}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["\u6bd4\u5982\u53ef\u4ee5\u4f20\u9012\u533f\u540d\u7c7b\u578b\uff0c\u7c7b\u7c7b\u578b\uff0c\u5b57\u5178 ",(0,s.jsx)(r.code,{children:"Dictionary<string, object>"})," \u7c7b\u578b\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,9,16,23}",children:'// \u4f1a\u8986\u76d6\u6240\u6709\u76f8\u540c\u7684\u503c\r\ntriggerBuilder.LoadFrom(new\r\n{\r\n Description = "\u6211\u662f\u63cf\u8ff0",\r\n StartTime = DateTime.Now\r\n});\r\n\r\n// \u652f\u6301\u591a\u4e2a\u586b\u5145\uff0c\u8fd8\u53ef\u4ee5\u914d\u7f6e\u8df3\u8fc7 null \u503c\u8986\u76d6\r\ntriggerBuilder.LoadFrom(new\r\n{\r\n Description = "\u6211\u662f\u53e6\u5916\u4e00\u4e2a\u63cf\u8ff0",\r\n StartTime = default(object),\r\n}, ignoreNullValue: true);\r\n\r\n// \u652f\u6301\u5ffd\u7565\u7279\u5b9a\u5c5e\u6027\u540d\u6620\u5c04\r\ntriggerBuilder.LoadFrom(new\r\n{\r\n Description = "\u6211\u662f\u53e6\u5916\u4e00\u4e2a\u63cf\u8ff0",\r\n TriggerId = "trigger1"\r\n}, ignorePropertyNames: new[]{ "description" });\r\n\r\n// \u652f\u6301\u5b57\u5178\u7c7b\u578b\r\ntriggerBuilder.LoadFrom(new Dictionary<string, object>\r\n{\r\n {"Description", "\u8fd9\u662f\u65b0\u7684\u63cf\u8ff0" },\r\n {"updatedTime", DateTime.Now }\r\n});\n'})}),"\n",(0,s.jsx)(r.admonition,{title:"\u5173\u4e8e\u5c5e\u6027\u540d\u5339\u914d\u89c4\u5219",type:"important",children:(0,s.jsxs)(r.p,{children:["\u652f\u6301 ",(0,s.jsx)(r.code,{children:"CamelCase\uff08\u9a7c\u5cf0\u547d\u540d\u6cd5\uff09"}),"\uff0c",(0,s.jsx)(r.code,{children:"Pascal\uff08\u5e15\u65af\u5361\u547d\u540d\u6cd5\uff09"})," \u548c ",(0,s.jsx)(r.code,{children:"UnderScoreCase\uff08\u4e0b\u5212\u7ebf\u547d\u540d\u6cd5\uff09"})," \u547d\u540d\u65b9\u5f0f\u3002"]})}),"\n",(0,s.jsx)(r.h3,{id:"26154-\u5185\u7f6e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668",children:"26.1.5.4 \u5185\u7f6e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668"}),"\n",(0,s.jsxs)(r.p,{children:["\u4e3a\u4e86\u65b9\u4fbf\u5feb\u901f\u5b9e\u73b0\u4f5c\u4e1a\u89e6\u53d1\u5668\uff0c\u4f5c\u4e1a\u8c03\u5ea6\u6a21\u5757\u5185\u7f6e\u4e86 ",(0,s.jsx)(r.code,{children:"Period\uff08\u95f4\u9694\uff09"})," \u548c ",(0,s.jsx)(r.code,{children:"Cron\uff08\u8868\u8fbe\u5f0f\uff09"})," \u4f5c\u4e1a\u89e6\u53d1\u5668\uff0c\u53ef\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"TriggerBuilder"})," \u7c7b\u578b\u6216 ",(0,s.jsx)(r.code,{children:"Triggers"})," \u9759\u6001\u7c7b\u521b\u5efa\u3002"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"TriggerBuilder"})," \u65b9\u5f0f"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-c",metastring:"showLineNumbers {2,5}",children:'// \u521b\u5efa\u6beb\u79d2\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = TriggerBuilder.Period(5000);\r\n\r\n// \u521b\u5efa Cron \u8868\u8fbe\u5f0f\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = TriggerBuilder.Cron("* * * * *", CronStringFormat.Default);\n'})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"Triggers"})," \u65b9\u5f0f\uff0c\u2764\ufe0f \u63a8\u8350"]})}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"Triggers"})," \u9759\u6001\u7c7b\u5177\u5907 ",(0,s.jsx)(r.code,{children:"TriggerBuilder"})," \u6240\u6709\u7684\u9759\u6001\u65b9\u6cd5\u540c\u65f6\u8fd8\u6dfb\u52a0\u4e86\u4e0d\u5c11\u66f4\u52a0\u4fbf\u6377\u7684\u9759\u6001\u65b9\u6cd5\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,11,31}",children:'// \u95f4\u9694 Period \u65b9\u5f0f\r\n// \u521b\u5efa\u6beb\u79d2\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.Period(5000);\r\n// \u521b\u5efa\u79d2\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.PeriodSeconds(5);\r\n// \u521b\u5efa\u5206\u949f\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.PeriodMinutes(5);\r\n// \u521b\u5efa\u5c0f\u65f6\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.PeriodHours(5);\r\n\r\n// Cron \u8868\u8fbe\u5f0f\u65b9\u5f0f\r\n// \u521b\u5efa Cron \u8868\u8fbe\u5f0f\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.Cron("* * * * *", CronStringFormat.Default);\r\n// \u521b\u5efa\u6bcf\u79d2\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.Secondly();\r\n// \u521b\u5efa\u6bcf\u5206\u949f\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.Minutely();\r\n// \u521b\u5efa\u6bcf\u5c0f\u65f6\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.Hourly();\r\n// \u521b\u5efa\u6bcf\u5929\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.Daily();\r\n// \u521b\u5efa\u6bcf\u67081\u53f7\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.Monthly();\r\n// \u521b\u5efa\u6bcf\u5468\u65e5\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.Weekly();\r\n// \u521b\u5efa\u6bcf\u5e741\u67081\u53f7\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.Yearly();\r\n// \u521b\u5efa\u6bcf\u5468\u4e00\u81f3\u5468\u4e94\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = Triggers.Workday();\r\n\r\n// Cron \u8868\u8fbe\u5f0f Macro At \u65b9\u5f0f\r\n// \u6bcf\u7b2c 3 \u79d2\r\nvar triggerBuilder = Triggers.SecondlyAt(3);\r\n// \u6bcf\u7b2c 3\uff0c5\uff0c6 \u79d2\r\nvar triggerBuilder = Triggers.SecondlyAt(3, 5, 6);\r\n\r\n// \u6bcf\u5206\u949f\u7b2c 3 \u79d2\r\nvar triggerBuilder = Triggers.MinutelyAt(3);\r\n// \u6bcf\u5206\u949f\u7b2c 3\uff0c5\uff0c6 \u79d2\r\nvar triggerBuilder = Triggers.MinutelyAt(3, 5, 6);\r\n\r\n// \u6bcf\u5c0f\u65f6\u7b2c 3 \u5206\u949f\r\nvar triggerBuilder = Triggers.HourlyAt(3);\r\n// \u6bcf\u5c0f\u65f6\u7b2c 3\uff0c5\uff0c6 \u5206\u949f\r\nvar triggerBuilder = Triggers.HourlyAt(3, 5, 6);\r\n\r\n// \u6bcf\u5929\u7b2c 3 \u5c0f\u65f6\u6b63\uff08\u70b9\uff09\r\nvar triggerBuilder = Triggers.DailyAt(3);\r\n// \u6bcf\u5929\u7b2c 3\uff0c5\uff0c6 \u5c0f\u65f6\u6b63\uff08\u70b9\uff09\r\nvar triggerBuilder = Triggers.DailyAt(3, 5, 6);\r\n\r\n// \u6bcf\u6708\u7b2c 3 \u5929\u96f6\u70b9\u6b63\r\nvar triggerBuilder = Triggers.MonthlyAt(3);\r\n// \u6bcf\u6708\u7b2c 3\uff0c5\uff0c6 \u5929\u96f6\u70b9\u6b63\r\nvar triggerBuilder = Triggers.MonthlyAt(3, 5, 6);\r\n\r\n// \u6bcf\u5468\u661f\u671f 3 \u96f6\u70b9\u6b63\r\nvar triggerBuilder = Triggers.WeeklyAt(3);\r\nvar triggerBuilder = Triggers.WeeklyAt("WED"); // SUN\uff08\u661f\u671f\u5929\uff09\uff0cMON\uff0cTUE\uff0cWED\uff0cTHU\uff0cFRI\uff0cSAT\r\n// \u6bcf\u5468\u661f\u671f 3\uff0c5\uff0c6 \u96f6\u70b9\u6b63\r\nvar triggerBuilder = Triggers.WeeklyAt(3, 5, 6);\r\nvar triggerBuilder = Triggers.WeeklyAt("WED", "FRI", "SAT");\r\n// \u8fd8\u652f\u6301\u6df7\u5408\r\nvar triggerBuilder = Triggers.WeeklyAt(3, "FRI", 6);\r\n\r\n// \u6bcf\u5e74\u7b2c 3 \u6708 1 \u65e5\u96f6\u70b9\u6b63\r\nvar triggerBuilder = Triggers.YearlyAt(3);\r\nvar triggerBuilder = Triggers.YearlyAt("MAR"); // JAN\uff08\u4e00\u6708\uff09\uff0cFEB\uff0cMAR\uff0cAPR\uff0cMAY\uff0cJUN\uff0cJUL\uff0cAUG\uff0cSEP\uff0cOCT\uff0cNOV\uff0cDEC\r\n// \u6bcf\u5e74\u7b2c 3\uff0c5\uff0c6 \u6708 1 \u65e5\u96f6\u70b9\u6b63\r\nvar triggerBuilder = Triggers.YearlyAt(3);\r\nvar triggerBuilder = Triggers.YearlyAt(3, 5, 6);\r\nvar triggerBuilder = Triggers.YearlyAt("MAR", "MAY", "JUN");\r\n// \u8fd8\u652f\u6301\u6df7\u5408\r\nvar triggerBuilder = Triggers.YearlyAt(3, "MAY", 6);\n'})}),"\n",(0,s.jsx)(r.h3,{id:"26155-\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668",children:"26.1.5.5 \u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668"}),"\n",(0,s.jsxs)(r.p,{children:["\u9664\u4e86\u4f7f\u7528\u6846\u67b6\u63d0\u4f9b\u7684 ",(0,s.jsx)(r.code,{children:"PeriodTrigger"})," \u548c ",(0,s.jsx)(r.code,{children:"CronTrigger"})," \u4ee5\u5916\uff0c\u8fd8\u53ef\u4ee5\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668\uff0c\u53ea\u9700\u8981\u7ee7\u627f ",(0,s.jsx)(r.code,{children:"Trigger"})," \u5e76\u91cd\u5199 ",(0,s.jsx)(r.code,{children:"GetNextOccurrence"})," \u65b9\u6cd5\u5373\u53ef\uff0c\u5982\u5b9e\u73b0\u4e00\u4e2a\u95f4\u9694\u4e24\u79d2\u7684\u4f5c\u4e1a\u89e6\u53d1\u5668\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3,5}",children:"public class CustomTrigger : Trigger\r\n{\r\n public override DateTime GetNextOccurrence(DateTime startAt)\r\n {\r\n return startAt.AddSeconds(2);\r\n }\r\n}\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u4e4b\u540e\u53ef\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"TriggerBuilder.Create"})," \u6216 ",(0,s.jsx)(r.code,{children:"Triggers.Create"})," \u521b\u5efa\u5373\u53ef\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:"services.AddSchedule(options =>\r\n{\r\n options.AddJob<MyJob>(Triggers.Create<CustomTrigger>());\r\n});\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {12,14,16}",children:"info: 2022-12-04 17:19:25.0980531 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-04 17:19:25.1027083 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-04 17:19:25.2702054 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-04 17:19:25.2723418 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-04 17:19:25.2999295 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-04 17:19:27.2849015 +08:00 \u661f\u671f\u65e5 L MyJob[0] #8\r\n <job1> [C] <job1 job1_trigger1> 1ts 2022-12-04 17:19:27.234 -> 2022-12-04 17:19:29.232\r\ninfo: 2022-12-04 17:19:29.2604639 +08:00 \u661f\u671f\u65e5 L MyJob[0] #4\r\n <job1> [C] <job1 job1_trigger1> 2ts 2022-12-04 17:19:29.232 -> 2022-12-04 17:19:31.225\r\ninfo: 2022-12-04 17:19:31.2422514 +08:00 \u661f\u671f\u65e5 L MyJob[0] #10\r\n <job1> [C] <job1 job1_trigger1> 3ts 2022-12-04 17:19:31.225 -> 2022-12-04 17:19:33.207\n"})}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u53e6\u5916\uff0c\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668\u8fd8\u652f\u6301\u914d\u7f6e\u6784\u9020\u51fd\u6570\u53c2\u6570"})}),"\n",(0,s.jsxs)(r.admonition,{title:"\u53c2\u6570\u7279\u522b\u8bf4\u660e",type:"important",children:[(0,s.jsxs)(r.p,{children:["\u5982\u679c\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668\u5305\u542b\u53c2\u6570\uff0c\u90a3\u4e48",(0,s.jsx)(r.strong,{children:"\u5fc5\u987b\u6ee1\u8db3\u4ee5\u4e0b\u4e24\u4e2a\u6761\u4ef6"}),"\uff1a"]}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.strong,{children:"\u53c2\u6570\u5fc5\u987b\u901a\u8fc7\u552f\u4e00\u7684\u6784\u9020\u51fd\u6570\u4f20\u5165\uff0c\u6709\u4e14\u6700\u591a\u53ea\u80fd\u62e5\u6709\u4e00\u4e2a\u6784\u9020\u51fd\u6570"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u53c2\u6570\u7684\u7c7b\u578b\u53ea\u80fd\u662f ",(0,s.jsx)(r.code,{children:"int"}),"\uff0c",(0,s.jsx)(r.code,{children:"string"}),"\uff0c",(0,s.jsx)(r.code,{children:"bool"}),"\uff0c",(0,s.jsx)(r.code,{children:"null"})," \u6216\u7531\u5b83\u4eec\u7ec4\u6210\u7684\u6570\u7ec4\u7c7b\u578b"]})}),"\n"]})]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3,5,8,12}",children:"public class CustomTrigger : Trigger\r\n{\r\n public CustomTrigger(int seconds) // \u53ef\u652f\u6301\u591a\u4e2a\u53c2\u6570\r\n {\r\n Seconds = seconds;\r\n }\r\n\r\n private int Seconds { get; set; }\r\n\r\n public override DateTime GetNextOccurrence(DateTime startAt)\r\n {\r\n return startAt.AddSeconds(Seconds);\r\n }\r\n}\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u4e4b\u540e\u53ef\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"TriggerBuilder.Create"})," \u6216 ",(0,s.jsx)(r.code,{children:"Triggers.Create"})," \u521b\u5efa\u5e76\u4f20\u5165\u53c2\u6570\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:"services.AddSchedule(options =>\r\n{\r\n options.AddJob<MyJob>(Triggers.Create<CustomTrigger>(3));\r\n});\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {12,14,16}",children:"info: 2022-12-04 17:23:09.3029251 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-04 17:23:09.3205593 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-04 17:23:09.7081119 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-04 17:23:09.7506504 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-04 17:23:09.9380816 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-04 17:23:12.6291716 +08:00 \u661f\u671f\u65e5 L MyJob[0] #6\r\n <job1> [C] <job1 job1_trigger1> 1ts 2022-12-04 17:23:12.590 -> 2022-12-04 17:23:15.582\r\ninfo: 2022-12-04 17:23:15.6141563 +08:00 \u661f\u671f\u65e5 L MyJob[0] #9\r\n <job1> [C] <job1 job1_trigger1> 2ts 2022-12-04 17:23:15.582 -> 2022-12-04 17:23:18.572\r\ninfo: 2022-12-04 17:23:18.5857464 +08:00 \u661f\u671f\u65e5 L MyJob[0] #8\r\n <job1> [C] <job1 job1_trigger1> 3ts 2022-12-04 17:23:18.572 -> 2022-12-04 17:23:21.551\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668\u9664\u4e86\u53ef\u91cd\u5199 ",(0,s.jsx)(r.code,{children:"GetNextOccurrence"})," \u65b9\u6cd5\u4e4b\u540e\uff0c\u8fd8\u63d0\u4f9b\u4e86 ",(0,s.jsx)(r.code,{children:"ShouldRun"})," \u548c ",(0,s.jsx)(r.code,{children:"ToString"})," \u65b9\u6cd5\u53ef\u91cd\u5199\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {15,21}",children:'public class CustomTrigger : Trigger\r\n{\r\n public CustomTrigger(int seconds)\r\n {\r\n Seconds = seconds;\r\n }\r\n\r\n private int Seconds { get; set; }\r\n\r\n public override DateTime GetNextOccurrence(DateTime startAt)\r\n {\r\n return startAt.AddSeconds(Seconds);\r\n }\r\n\r\n public override bool ShouldRun(JobDetail jobDetail, DateTime startAt)\r\n {\r\n // \u5728\u8fd9\u91cc\u8fdb\u4e00\u6b65\u63a7\u5236\uff0c\u5982\u679c\u8fd4\u56de false\uff0c\u5219\u4f5c\u4e1a\u89e6\u53d1\u5668\u8df3\u8fc7\u6267\u884c\r\n return base.ShouldRun(jobDetail, startAt);\r\n }\r\n\r\n public override string ToString()\r\n {\r\n return $"<{TriggerId}> \u81ea\u5b9a\u4e49\u9012\u589e {Seconds}s \u89e6\u53d1\u5668";\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.p,{children:["\u63a8\u8350\u91cd\u5199 ",(0,s.jsx)(r.code,{children:"GetNextRunTime"})," \u548c ",(0,s.jsx)(r.code,{children:"ToString"})," \u65b9\u6cd5\u5373\u53ef\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {11}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context}");\r\n await Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {12,14,16}",children:"info: 2022-12-04 17:26:43.9120082 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-04 17:26:43.9166481 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-04 17:26:44.1786114 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-04 17:26:44.1816154 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-04 17:26:44.2077386 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-04 17:26:47.1904549 +08:00 \u661f\u671f\u65e5 L MyJob[0] #8\r\n <job1> [C] <job1_trigger1> \u81ea\u5b9a\u4e49\u9012\u589e 3s \u89e6\u53d1\u5668 2022-12-04 17:26:47.139 -> 2022-12-04 17:26:50.145\r\ninfo: 2022-12-04 17:26:50.1652618 +08:00 \u661f\u671f\u65e5 L MyJob[0] #6\r\n <job1> [C] <job1_trigger1> \u81ea\u5b9a\u4e49\u9012\u589e 3s \u89e6\u53d1\u5668 2022-12-04 17:26:50.145 -> 2022-12-04 17:26:53.129\r\ninfo: 2022-12-04 17:26:53.1426614 +08:00 \u661f\u671f\u65e5 L MyJob[0] #8\r\n <job1> [C] <job1_trigger1> \u81ea\u5b9a\u4e49\u9012\u589e 3s \u89e6\u53d1\u5668 2022-12-04 17:26:53.129 -> 2022-12-04 17:26:56.106\n"})}),"\n",(0,s.jsx)(r.h3,{id:"26156-\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027\u53ca\u81ea\u5b9a\u4e49",children:"26.1.5.6 \u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027\u53ca\u81ea\u5b9a\u4e49"}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u679c ",(0,s.jsx)(r.code,{children:"JobBuilder"})," \u914d\u7f6e\u4e86 ",(0,s.jsx)(r.code,{children:"IncludeAnnotations"})," \u53c2\u6570\u4e14\u4e3a ",(0,s.jsx)(r.code,{children:"true"}),"\uff0c\u90a3\u4e48\u5c06\u4f1a\u81ea\u52a8\u89e3\u6790 ",(0,s.jsx)(r.code,{children:"IJob"})," \u7684\u5b9e\u73b0\u7c7b\u578b\u7684\u6240\u6709\u7ee7\u627f ",(0,s.jsx)(r.code,{children:"TriggerAttribute"})," \u7684\u7279\u6027\uff0c\u76ee\u524d\u4f5c\u4e1a\u8c03\u5ea6\u6a21\u5757\u5185\u7f6e\u4e86\u4ee5\u4e0b\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[Period(5000)]"}),"\uff1a\u6beb\u79d2\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[PeriodSeconds(5)]"}),"\uff1a\u79d2\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[PeriodMinutes(5)]"}),"\uff1a\u5206\u949f\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[PeriodHours(5)]"}),"\uff1a\u5c0f\u65f6\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:'[Cron("* * * * *", CronStringFormat.Default)]'}),"\uff1aCron \u8868\u8fbe\u5f0f\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[Secondly]"}),"\uff1a\u6bcf\u79d2\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[Minutely]"}),"\uff1a\u6bcf\u5206\u949f\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[Hourly]"}),"\uff1a\u6bcf\u5c0f\u65f6\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[Daily]"}),"\uff1a\u6bcf\u5929\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[Monthly]"}),"\uff1a\u6bcf\u6708 1 \u53f7\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[Weekly]"}),"\uff1a\u6bcf\u5468\u65e5\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[Yearly]"}),"\uff1a\u6bcf\u5e74 1 \u6708 1 \u53f7\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[Workday]"}),"\uff1a\u6bcf\u5468\u4e00\u81f3\u5468\u4e94\uff08\u5348\u591c\uff09\u5f00\u59cb\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[SecondlyAt]"}),"\uff1a\u7279\u5b9a\u79d2\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[MinutelyAt]"}),"\uff1a\u6bcf\u5206\u949f\u7279\u5b9a\u79d2\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[HourlyAt]"}),"\uff1a\u6bcf\u5c0f\u65f6\u7279\u5b9a\u5206\u949f\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[DailyAt]"}),"\uff1a\u6bcf\u5929\u7279\u5b9a\u5c0f\u65f6\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[MonthlyAt]"}),"\uff1a\u6bcf\u6708\u7279\u5b9a\u5929\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[WeeklyAt]"}),"\uff1a\u6bcf\u5468\u7279\u5b9a\u661f\u671f\u51e0\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"[YearlyAt]"}),"\uff1a\u6bcf\u5e74\u7279\u5b9a\u6708 1 \u53f7\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"]}),"\n"]}),"\n",(0,s.jsx)(r.p,{children:"\u4f7f\u7528\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3,6,10,13}",children:"services.AddSchedule(options =>\r\n{\r\n options.AddJob(JobBuilder.Create<MyJob>().SetIncludeAnnotations(true));\r\n\r\n // \u4e5f\u652f\u6301\u81ea\u5b9a\u4e49\u914d\u7f6e + \u7279\u6027\u626b\u63cf\r\n options.AddJob(JobBuilder.Create<MyJob>().SetIncludeAnnotations(true)\r\n , Triggers.PeriodSeconds(5));\r\n\r\n // \u6216\u8005\u901a\u8fc7\u7c7b\u578b\u626b\u63cf\r\n options.AddJob(typeof(MyJobj).ScanToBuilder());\r\n\r\n // \u8fd8\u53ef\u4ee5\u6279\u91cf\u626b\u63cf Furion 4.8.2.4+\r\n options.AddJob(App.EffectiveTypes.ScanToBuilders());\r\n});\n"})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1-3}",children:'[Minutely]\r\n[PeriodSeconds(5)]\r\n[Cron("*/3 * * * * *", CronStringFormat.WithSeconds)]\r\npublic class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context}");\r\n await Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {6,8,10,12,16,18,20,30}",children:"info: 2022-12-04 17:35:47.0211372 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-04 17:35:47.0267027 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-04 17:35:47.2906591 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-04 17:35:47.2921849 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger2> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-04 17:35:47.2961669 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger3> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-04 17:35:47.2979859 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-04 17:35:47.3194555 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-04 17:35:48.0588231 +08:00 \u661f\u671f\u65e5 L MyJob[0] #8\r\n <job1> [C] <job1 job1_trigger3> */3 * * * * * 1ts 2022-12-04 17:35:48.000 -> 2022-12-04 17:35:51.000\r\ninfo: 2022-12-04 17:35:51.0240459 +08:00 \u661f\u671f\u65e5 L MyJob[0] #9\r\n <job1> [C] <job1 job1_trigger3> */3 * * * * * 2ts 2022-12-04 17:35:51.000 -> 2022-12-04 17:35:54.000\r\ninfo: 2022-12-04 17:35:52.2643935 +08:00 \u661f\u671f\u65e5 L MyJob[0] #12\r\n <job1> [C] <job1 job1_trigger2> 5s 1ts 2022-12-04 17:35:52.246 -> 2022-12-04 17:35:57.227\r\ninfo: 2022-12-04 17:35:54.0175524 +08:00 \u661f\u671f\u65e5 L MyJob[0] #6\r\n <job1> [C] <job1 job1_trigger3> */3 * * * * * 3ts 2022-12-04 17:35:54.000 -> 2022-12-04 17:35:57.000\r\ninfo: 2022-12-04 17:35:57.0270544 +08:00 \u661f\u671f\u65e5 L MyJob[0] #9\r\n <job1> [C] <job1 job1_trigger3> */3 * * * * * 4ts 2022-12-04 17:35:57.000 -> 2022-12-04 17:36:00.000\r\ninfo: 2022-12-04 17:35:57.2433514 +08:00 \u661f\u671f\u65e5 L MyJob[0] #12\r\n <job1> [C] <job1 job1_trigger2> 5s 2ts 2022-12-04 17:35:57.227 -> 2022-12-04 17:36:02.208\r\ninfo: 2022-12-04 17:36:00.0151605 +08:00 \u661f\u671f\u65e5 L MyJob[0] #14\r\n <job1> [C] <job1 job1_trigger3> */3 * * * * * 5ts 2022-12-04 17:36:00.000 -> 2022-12-04 17:36:03.000\r\ninfo: 2022-12-04 17:36:00.0315972 +08:00 \u661f\u671f\u65e5 L MyJob[0] #8\r\n <job1> [C] <job1 job1_trigger1> * * * * * 1ts 2022-12-04 17:36:00.000 -> 2022-12-04 17:37:00.000\r\ninfo: 2022-12-04 17:36:02.2203934 +08:00 \u661f\u671f\u65e5 L MyJob[0] #12\r\n <job1> [C] <job1 job1_trigger2> 5s 3ts 2022-12-04 17:36:02.208 -> 2022-12-04 17:36:07.184\n"})}),"\n",(0,s.jsx)(r.hr,{}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"\u9664\u4e86\u4f7f\u7528\u5185\u7f6e\u7279\u6027\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027"}),"\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,2,5}",children:"[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]\r\npublic class CustomAttribute : TriggerAttribute\r\n{\r\n public CustomAttribute(int seconds)\r\n : base(typeof(CustomTrigger), seconds)\r\n {\r\n }\r\n}\n"})}),"\n",(0,s.jsx)(r.admonition,{title:"\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668\u5fc5\u5907\u6761\u4ef6",type:"tip",children:(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\u5fc5\u987b\u7ee7\u627f ",(0,s.jsx)(r.code,{children:"TriggerAttribute"})," \u7279\u6027\u7c7b"]}),"\n",(0,s.jsxs)(r.li,{children:["\u81f3\u5c11\u5305\u542b\u4e00\u4e2a\u6784\u9020\u51fd\u6570\u4e14\u901a\u8fc7\u57fa\u7c7b\u6784\u9020\u51fd\u6570\u914d\u7f6e ",(0,s.jsx)(r.code,{children:":base(\u5b9e\u9645\u89e6\u53d1\u5668\u7c7b\u578b, \u6784\u9020\u51fd\u6570\u53c2\u6570)"})]}),"\n",(0,s.jsxs)(r.li,{children:["\u63a8\u8350\u6dfb\u52a0 ",(0,s.jsx)(r.code,{children:"[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]"})," \u7279\u6027"]}),"\n"]})}),"\n",(0,s.jsx)(r.p,{children:"\u4f7f\u7528\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1}",children:'[Custom(3)]\r\npublic class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context}");\r\n await Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {12,14,16}",children:"info: 2022-12-04 17:44:12.2702884 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-04 17:44:12.2872399 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-04 17:44:12.5730241 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-04 17:44:12.5751444 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-04 17:44:12.6174459 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-04 17:44:15.5850848 +08:00 \u661f\u671f\u65e5 L MyJob[0] #6\r\n <job1> [C] <job1_trigger1> \u81ea\u5b9a\u4e49\u9012\u589e 3s \u89e6\u53d1\u5668 2022-12-04 17:44:15.537 -> 2022-12-04 17:44:18.542\r\ninfo: 2022-12-04 17:44:18.5693881 +08:00 \u661f\u671f\u65e5 L MyJob[0] #8\r\n <job1> [C] <job1_trigger1> \u81ea\u5b9a\u4e49\u9012\u589e 3s \u89e6\u53d1\u5668 2022-12-04 17:44:18.542 -> 2022-12-04 17:44:21.527\r\ninfo: 2022-12-04 17:44:21.5396428 +08:00 \u661f\u671f\u65e5 L MyJob[0] #6\r\n <job1> [C] <job1_trigger1> \u81ea\u5b9a\u4e49\u9012\u589e 3s \u89e6\u53d1\u5668 2022-12-04 17:44:21.527 -> 2022-12-04 17:44:24.504\n"})}),"\n",(0,s.jsx)(r.hr,{}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"\u4f5c\u4e1a\u89e6\u53d1\u5668\u7279\u6027\u8fd8\u63d0\u4f9b\u4e86\u591a\u4e2a\u5c5e\u6027\u914d\u7f6e"}),"\uff0c\u5982\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"TriggerId"}),"\uff1a\u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Id"}),"\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Description"}),"\uff1a\u63cf\u8ff0\u4fe1\u606f\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"StartTime"}),"\uff1a\u8d77\u59cb\u65f6\u95f4\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"EndTime"}),"\uff1a\u7ed3\u675f\u65f6\u95f4\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"MaxNumberOfRuns"}),"\uff1a\u6700\u5927\u89e6\u53d1\u6b21\u6570\uff0c",(0,s.jsx)(r.code,{children:"long"})," \u7c7b\u578b\uff0c",(0,s.jsx)(r.code,{children:"0"}),"\uff1a\u4e0d\u9650\u5236\uff1b",(0,s.jsx)(r.code,{children:"n"}),"\uff1aN \u6b21"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"MaxNumberOfErrors"}),"\uff1a\u6700\u5927\u51fa\u9519\u6b21\u6570\uff0c",(0,s.jsx)(r.code,{children:"long"})," \u7c7b\u578b\uff0c",(0,s.jsx)(r.code,{children:"0"}),"\uff1a\u4e0d\u9650\u5236\uff1b",(0,s.jsx)(r.code,{children:"n"}),"\uff1aN \u6b21"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"NumRetries"}),"\uff1a\u91cd\u8bd5\u6b21\u6570\uff0c",(0,s.jsx)(r.code,{children:"int"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4\u503c ",(0,s.jsx)(r.code,{children:"0"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"RetryTimeout"}),"\uff1a\u91cd\u8bd5\u95f4\u9694\u65f6\u95f4\uff0c",(0,s.jsx)(r.code,{children:"int"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4\u503c ",(0,s.jsx)(r.code,{children:"1000"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"StartNow"}),"\uff1a\u662f\u5426\u7acb\u5373\u542f\u52a8\uff0c",(0,s.jsx)(r.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4\u503c ",(0,s.jsx)(r.code,{children:"true"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"RunOnStart"}),"\uff1a\u662f\u5426\u542f\u52a8\u65f6\u6267\u884c\u4e00\u6b21\uff0c",(0,s.jsx)(r.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4\u503c ",(0,s.jsx)(r.code,{children:"false"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ResetOnlyOnce"}),"\uff1a\u662f\u5426\u5728\u542f\u52a8\u65f6\u91cd\u7f6e\u6700\u5927\u89e6\u53d1\u6b21\u6570\u7b49\u4e8e\u4e00\u6b21\u7684\u4f5c\u4e1a\uff0c",(0,s.jsx)(r.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4\u503c ",(0,s.jsx)(r.code,{children:"true"})]}),"\n"]}),"\n",(0,s.jsx)(r.p,{children:"\u4f7f\u7528\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1}",children:'[PeriodSeconds(5, TriggerId = "trigger1", Description = "\u8fd9\u662f\u4e00\u6bb5\u63cf\u8ff0")]\r\npublic class MyJob : IJob\r\n{\r\n // ...\r\n}\n'})}),"\n",(0,s.jsx)(r.h3,{id:"26157-\u8bbe\u7f6e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668",children:"26.1.5.7 \u8bbe\u7f6e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"TriggerBuilder"})," \u63d0\u4f9b\u4e86\u548c ",(0,s.jsx)(r.code,{children:"Trigger"})," \u5b8c\u5168\u5339\u914d\u7684 ",(0,s.jsx)(r.code,{children:"Set[\u5c5e\u6027\u540d]"})," \u65b9\u6cd5\u6765\u914d\u7f6e\u4f5c\u4e1a\u89e6\u53d1\u5668\u5404\u4e2a\u5c5e\u6027\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3,29}",children:' services.AddSchedule(options =>\r\n {\r\n var triggerBuilder = Triggers.Period(5000)\r\n .SetTriggerId("trigger1") // \u4f5c\u4e1a\u89e6\u53d1\u5668 Id\r\n .SetTriggerType("Furion", "Furion.Schedule.PeriodTrigger") // \u4f5c\u4e1a\u89e6\u53d1\u5668\u7c7b\u578b\uff0c\u652f\u6301\u591a\u4e2a\u91cd\u8f7d\r\n .SetTriggerType<PeriodTrigger>() // \u4f5c\u4e1a\u89e6\u53d1\u5668\u7c7b\u578b\uff0c\u652f\u6301\u591a\u4e2a\u91cd\u8f7d\r\n .SetTriggerType(typeof(PeriodTrigger)) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u7c7b\u578b\uff0c\u652f\u6301\u591a\u4e2a\u91cd\u8f7d\r\n .SetArgs("[5000]") // \u4f5c\u4e1a\u89e6\u53d1\u5668\u53c2\u6570 object[] \u5e8f\u5217\u5316\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u652f\u6301\u591a\u4e2a\u91cd\u8f7d\r\n .SetArgs(5000) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u53c2\u6570\uff0c\u652f\u6301\u591a\u4e2a\u91cd\u8f7d\r\n .SetDescription("\u4f5c\u4e1a\u89e6\u53d1\u5668\u63cf\u8ff0") // \u4f5c\u4e1a\u89e6\u53d1\u5668\u63cf\u8ff0\r\n .SetStatus(TriggerStatus.Ready) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u72b6\u6001\r\n .SetStartTime(DateTime.Now) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u8d77\u59cb\u65f6\u95f4\r\n .SetEndTime(DateTime.Now.AddMonths(1)) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u7ed3\u675f\u65f6\u95f4\r\n .SetLastRunTime(DateTime.Now.AddSeconds(-5)) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u6700\u8fd1\u8fd0\u884c\u65f6\u95f4\r\n .SetNextRunTime(DateTime.Now.AddSeconds(5)) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u4e0b\u4e00\u6b21\u8fd0\u884c\u65f6\u95f4\r\n .SetNumberOfRuns(1) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u89e6\u53d1\u6b21\u6570\r\n .SetMaxNumberOfRuns(100) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u6700\u5927\u89e6\u53d1\u5668\u6b21\u6570\r\n .SetNumberOfErrors(1) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u51fa\u9519\u6b21\u6570\r\n .SetMaxNumberOfErrors(100) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u6700\u5927\u51fa\u9519\u6b21\u6570\r\n .SetNumRetries(3) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u51fa\u9519\u91cd\u8bd5\u6b21\u6570\r\n .SetRetryTimeout(1000) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u91cd\u8bd5\u95f4\u9694\u65f6\u95f4\r\n .SetStartNow(true) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u662f\u5426\u7acb\u5373\u542f\u52a8\r\n .SetRunOnStart(false) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u662f\u5426\u542f\u52a8\u65f6\u6267\u884c\u4e00\u6b21\r\n .SetResetOnlyOnce(true) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u662f\u5426\u5728\u542f\u52a8\u65f6\u91cd\u7f6e\u6700\u5927\u89e6\u53d1\u6b21\u6570\u7b49\u4e8e\u4e00\u6b21\u7684\u4f5c\u4e1a\r\n .SetResult("\u672c\u6b21\u8fd4\u56de\u7ed3\u679c") // \u4f5c\u4e1a\u89e6\u53d1\u5668\u672c\u6b21\u6267\u884c\u8fd4\u56de\u7ed3\u679c\uff0cFurion 4.8.7.7+\r\n .SetElapsedTime(100) // \u4f5c\u4e1a\u89e6\u53d1\u5668\u672c\u6b21\u6267\u884c\u8017\u65f6\uff0cFurion 4.8.7.7+\r\n ;\r\n\r\n options.AddJob<MyJob>(triggerBuilder);\r\n });\n'})}),"\n",(0,s.jsx)(r.h3,{id:"26158-\u4f5c\u4e1a\u89e6\u53d1\u5668\u6301\u4e45\u5316\u65b9\u6cd5",children:"26.1.5.8 \u4f5c\u4e1a\u89e6\u53d1\u5668\u6301\u4e45\u5316\u65b9\u6cd5"}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668 ",(0,s.jsx)(r.code,{children:"TriggerBuilder"})," \u63d0\u4f9b\u4e86\u4e09\u4e2a\u6807\u8bb0\u4f5c\u4e1a\u6301\u4e45\u5316\u884c\u4e3a\u7684\u65b9\u6cd5\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Appended()"}),"\uff1a\u6807\u8bb0\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\u662f\u65b0\u589e\u7684\uff0c\u5c4a\u65f6\u751f\u6210\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u662f ",(0,s.jsx)(r.code,{children:"INSERT"})," \u8bed\u53e5"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Updated()"}),"\uff1a\u6807\u8bb0\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\u5df2\u88ab\u66f4\u65b0\uff0c\u5c4a\u65f6\u751f\u6210\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u662f ",(0,s.jsx)(r.code,{children:"Updated"})," \u8bed\u53e5\uff0c\u5982\u679c\u6807\u8bb0\u4e3a\u6b64\u64cd\u4f5c\uff0c\u90a3\u4e48\u5f53\u524d\u4f5c\u4e1a\u8c03\u5ea6\u5668\u521d\u59cb\u5316\u65f6\u5c06\u65b0\u589e\u81f3\u5185\u5b58\u4e2d"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Removed()"}),"\uff1a\u6807\u8bb0\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\u5df2\u88ab\u5220\u9664\uff0c\u5c4a\u65f6\u751f\u6210\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u662f ",(0,s.jsx)(r.code,{children:"Deleted"})," \u8bed\u53e5\uff0c\u5982\u679c\u6807\u8bb0\u4e3a\u6b64\u64cd\u4f5c\uff0c\u90a3\u4e48\u5f53\u524d\u4f5c\u4e1a\u8c03\u5ea6\u5668\u521d\u59cb\u5316\u65f6\u5c06\u4e0d\u4f1a\u6dfb\u52a0\u81f3\u4f5c\u4e1a\u8ba1\u5212\u4e2d"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4-6}",children:' services.AddSchedule(options =>\r\n{\r\n options.AddJob<MyJob>(\r\n Triggers.PeriodSeconds(5).SetTriggerId("trigger1").Appended()\r\n , Triggers.PeriodSeconds(5).SetTriggerId("trigger2").Updated()\r\n , Triggers.PeriodSeconds(5).SetTriggerId("trigger3").Removed());\r\n});\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u8c03\u5ea6\u5668\u521d\u59cb\u5316\u65e5\u5fd7\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {6,8,10,16,18}",children:"info: 2022-12-04 18:29:22.3997873 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-04 18:29:22.4045304 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-04 18:29:22.5473237 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <trigger3> trigger for scheduler of <job1> successfully removed to the schedule.\r\ninfo: 2022-12-04 18:29:22.5504289 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-04 18:29:22.5521396 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The <trigger2> trigger for scheduler of <job1> successfully appended and updated to the schedule.\r\ninfo: 2022-12-04 18:29:22.5535657 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-04 18:29:22.5896298 +08:00 \u661f\u671f\u65e5 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-04 18:29:27.5981907 +08:00 \u661f\u671f\u65e5 L MyJob[0] #14\r\n <job1> [C] <job1 trigger2> 5s 1ts 2022-12-04 18:29:27.507 -> 2022-12-04 18:29:32.500\r\ninfo: 2022-12-04 18:29:27.6002420 +08:00 \u661f\u671f\u65e5 L MyJob[0] #15\r\n <job1> [C] <job1 trigger1> 5s 1ts 2022-12-04 18:29:27.507 -> 2022-12-04 18:29:32.500\r\ninfo: 2022-12-04 18:29:32.5850223 +08:00 \u661f\u671f\u65e5 L MyJob[0] #12\r\n <job1> [C] <job1 trigger2> 5s 2ts 2022-12-04 18:29:32.500 -> 2022-12-04 18:29:37.548\r\ninfo: 2022-12-04 18:29:32.6034646 +08:00 \u661f\u671f\u65e5 L MyJob[0] #8\r\n <job1> [C] <job1 trigger1> 5s 2ts 2022-12-04 18:29:32.500 -> 2022-12-04 18:29:37.548\n"})}),"\n",(0,s.jsx)(r.h3,{id:"26159-\u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa",children:"26.1.5.9 \u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"Trigger"})," \u548c ",(0,s.jsx)(r.code,{children:"TriggerBuilder"})," \u90fd\u63d0\u4f9b\u4e86\u591a\u79cd\u5c06\u81ea\u8eab\u8f6c\u6362\u6210\u7279\u5b9a\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\u3002"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var json = trigger.ConvertToJSON();\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u5b57\u7b26\u4e32\u6253\u5370\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",metastring:"showLineNumbers",children:'{\r\n "triggerId": "job1_trigger1",\r\n "jobId": "job1",\r\n "triggerType": "Furion.Schedule.PeriodTrigger",\r\n "assemblyName": "Furion",\r\n "args": "[5000]",\r\n "description": null,\r\n "status": 2,\r\n "startTime": null,\r\n "endTime": null,\r\n "lastRunTime": "2022-12-04 17:52:34.768",\r\n "nextRunTime": "2022-12-04 17:52:39.769",\r\n "numberOfRuns": 1,\r\n "maxNumberOfRuns": 0,\r\n "numberOfErrors": 0,\r\n "maxNumberOfErrors": 0,\r\n "numRetries": 0,\r\n "retryTimeout": 1000,\r\n "startNow": true,\r\n "runOnStart": false,\r\n "resetOnlyOnce": true,\r\n "result": null,\r\n "elapsedTime": 100,\r\n "updatedTime": "2022-12-04 17:52:34.803"\r\n}\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"SQL"})," \u5b57\u7b26\u4e32"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,6,9,13,16,20}",children:'// \u8f93\u51fa\u65b0\u589e SQL\uff0c\u4f7f\u7528 CamelCase \u5c5e\u6027\u547d\u540d\r\nvar insertSql = trigger.ConvertToSQL("tbName"\r\n , PersistenceBehavior.Appended\r\n , NamingConventions.CamelCase);\r\n// \u66f4\u4fbf\u6377\u62d3\u5c55\r\nvar insertSql = trigger.ConvertToInsertSQL("tbName", NamingConventions.CamelCase);\r\n\r\n// \u8f93\u51fa\u5220\u9664 SQL\uff0c\u4f7f\u7528 Pascal \u5c5e\u6027\u547d\u540d\r\nvar deleteSql = trigger.ConvertToSQL("tbName"\r\n , PersistenceBehavior.Removed\r\n , NamingConventions.Pascal);\r\n// \u66f4\u4fbf\u6377\u62d3\u5c55\r\nvar deleteSql = trigger.ConvertToDeleteSQL("tbName", NamingConventions.Pascal);\r\n\r\n// \u8f93\u51fa\u66f4\u65b0 SQL\uff0c\u4f7f\u7528 UnderScoreCase \u5c5e\u6027\u547d\u540d\r\nvar updateSql = trigger.ConvertToSQL("tbName"\r\n , PersistenceBehavior.Updated\r\n , NamingConventions.UnderScoreCase);\r\n// \u66f4\u4fbf\u6377\u62d3\u5c55\r\nvar updateSql = trigger.ConvertToUpdateSQL("tbName", NamingConventions.UnderScoreCase);\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u5b57\u7b26\u4e32\u6253\u5370\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sql",metastring:"showLineNumbers {2,53,56}",children:"-- \u65b0\u589e\u64cd\u4f5c\r\nINSERT INTO tbName(\r\n triggerId,\r\n jobId,\r\n triggerType,\r\n assemblyName,\r\n args,\r\n description,\r\n status,\r\n startTime,\r\n endTime,\r\n lastRunTime,\r\n nextRunTime,\r\n numberOfRuns,\r\n maxNumberOfRuns,\r\n numberOfErrors,\r\n maxNumberOfErrors,\r\n numRetries,\r\n retryTimeout,\r\n startNow,\r\n runOnStart,\r\n resetOnlyOnce,\r\n result,\r\n elapsedTime,\r\n updatedTime\r\n)\r\nVALUES(\r\n 'job1_trigger1',\r\n 'job1',\r\n 'Furion.Schedule.PeriodTrigger',\r\n 'Furion',\r\n '[5000]',\r\n NULL,\r\n 2,\r\n NULL,\r\n NULL,\r\n '2022-12-04 17:54:42.693',\r\n '2022-12-04 17:54:47.721',\r\n 1,\r\n 0,\r\n 0,\r\n 0,\r\n 0,\r\n 1000,\r\n 1,\r\n 0,\r\n 1,\r\n NULL,\r\n 100,\r\n '2022-12-04 17:54:42.754'\r\n);\r\n-- \u5220\u9664\u64cd\u4f5c\r\nDELETE FROM tbName\r\nWHERE TriggerId = 'job1_trigger1' AND JobId = 'job1';\r\n-- \u66f4\u65b0\u64cd\u4f5c\r\nUPDATE tbName\r\nSET\r\n trigger_id = 'job1_trigger1',\r\n job_id = 'job1',\r\n trigger_type = 'Furion.Schedule.PeriodTrigger',\r\n assembly_name = 'Furion',\r\n args = '[5000]',\r\n description = NULL,\r\n status = 2,\r\n start_time = NULL,\r\n end_time = NULL,\r\n last_run_time = '2022-12-04 17:54:42.693',\r\n next_run_time = '2022-12-04 17:54:47.721',\r\n number_of_runs = 1,\r\n max_number_of_runs = 0,\r\n number_of_errors = 0,\r\n max_number_of_errors = 0,\r\n num_retries = 0,\r\n retry_timeout = 1000,\r\n start_now = 1,\r\n run_on_start = 0,\r\n reset_only_once = 1,\r\n result = NULL,\r\n elapsedTime = 100,\r\n updated_time = '2022-12-04 17:54:42.754'\r\nWHERE trigger_id = 'job1_trigger1' AND job_id = 'job1';\n"})}),"\n",(0,s.jsxs)(r.ol,{start:"3",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"Monitor"})," \u5b57\u7b26\u4e32"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var monitor = trigger.ConvertToMonitor();\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u5b57\u7b26\u4e32\u6253\u5370\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers",children:"\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 Trigger \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\r\n\u2523 Furion.Schedule.PeriodTrigger\r\n\u2523\r\n\u2523 triggerId\uff1a job1_trigger1\r\n\u2523 jobId\uff1a job1\r\n\u2523 triggerType\uff1a Furion.Schedule.PeriodTrigger\r\n\u2523 assemblyName\uff1a Furion\r\n\u2523 args\uff1a [5000]\r\n\u2523 description\uff1a\r\n\u2523 status\uff1a Running\r\n\u2523 startTime\uff1a\r\n\u2523 endTime\uff1a\r\n\u2523 lastRunTime\uff1a 2022-12-04 17:56:55.384\r\n\u2523 nextRunTime\uff1a 2022-12-04 17:57:00.379\r\n\u2523 numberOfRuns\uff1a 1\r\n\u2523 maxNumberOfRuns\uff1a 0\r\n\u2523 numberOfErrors\uff1a 0\r\n\u2523 maxNumberOfErrors\uff1a 0\r\n\u2523 numRetries\uff1a 0\r\n\u2523 retryTimeout\uff1a 1000\r\n\u2523 startNow\uff1a True\r\n\u2523 runOnStart\uff1a False\r\n\u2523 resetOnlyOnce\uff1a True\r\n\u2523 result\uff1a\r\n\u2523 elapsedTime\uff1a 100\r\n\u2523 updatedTime\uff1a 2022-12-04 17:56:55.413\r\n\u2517\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 Trigger \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n"})}),"\n",(0,s.jsxs)(r.ol,{start:"4",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.strong,{children:"\u7b80\u8981\u5b57\u7b26\u4e32\u8f93\u51fa"})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var str = trigger.ToString();\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u5b57\u7b26\u4e32\u6253\u5370\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers",children:"<job1 job1_trigger1> 5s \u8fd9\u662f\u4e00\u6bb5\u63cf\u8ff0 1ts\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"261510-\u81ea\u5b9a\u4e49-sql-\u8f93\u51fa\u914d\u7f6e",children:["26.1.5.10 \u81ea\u5b9a\u4e49 ",(0,s.jsx)(r.code,{children:"SQL"})," \u8f93\u51fa\u914d\u7f6e"]}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.2 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3,8,13,18}",children:"services.AddSchedule(options =>\r\n{\r\n options.Trigger.ConvertToSQL = (tableName, columnNames, trigger, behavior, naming) =>\r\n {\r\n // \u751f\u6210\u65b0\u589e SQL\r\n if (behavior == PersistenceBehavior.Appended)\r\n {\r\n return trigger.ConvertToInsertSQL(tableName, naming);\r\n }\r\n // \u751f\u6210\u66f4\u65b0 SQL\r\n else if (behavior == PersistenceBehavior.Updated)\r\n {\r\n return trigger.ConvertToUpdateSQL(tableName, naming);\r\n }\r\n // \u751f\u6210\u5220\u9664 SQL\r\n else if (behavior == PersistenceBehavior.Removed)\r\n {\r\n return trigger.ConvertToDeleteSQL(tableName, naming);\r\n }\r\n\r\n return string.Empty;\r\n };\r\n});\n"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ConvertToSQL"})," \u59d4\u6258\u53c2\u6570\u8bf4\u660e","\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"tableName"}),"\uff1a\u6570\u636e\u5e93\u8868\u540d\u79f0\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"columnNames"}),"\uff1a\u6570\u636e\u5e93\u5217\u540d\uff1a",(0,s.jsx)(r.code,{children:"string[]"})," \u7c7b\u578b\uff0c\u53ea\u80fd\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"\u7d22\u5f15"})," \u83b7\u53d6"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"trigger"}),"\uff1a\u4f5c\u4e1a\u4fe1\u606f ",(0,s.jsx)(r.code,{children:"Trigger"})," \u5bf9\u8c61"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"behavior"}),"\uff1a\u6301\u4e45\u5316 ",(0,s.jsx)(r.code,{children:"PersistenceBehavior"})," \u7c7b\u578b\uff0c\u7528\u4e8e\u6807\u8bb0\u65b0\u589e\uff0c\u66f4\u65b0\u8fd8\u662f\u5220\u9664\u64cd\u4f5c"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"naming"}),"\uff1a\u547d\u540d\u6cd5 ",(0,s.jsx)(r.code,{children:"NamingConventions"})," \u7c7b\u578b\uff0c\u5305\u542b ",(0,s.jsx)(r.code,{children:"CamelCase\uff08\u9a7c\u5cf0\u547d\u540d\u6cd5\uff09"}),"\uff0c",(0,s.jsx)(r.code,{children:"Pascal\uff08\u5e15\u65af\u5361\u547d\u540d\u6cd5\uff09"})," \u548c ",(0,s.jsx)(r.code,{children:"UnderScoreCase\uff08\u4e0b\u5212\u7ebf\u547d\u540d\u6cd5\uff09"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.admonition,{title:"\u6ce8\u610f\u4e8b\u9879",type:"caution",children:(0,s.jsxs)(r.p,{children:["\u5982\u679c\u5728\u8be5\u81ea\u5b9a\u4e49 ",(0,s.jsx)(r.code,{children:"SQL"})," \u8f93\u51fa\u65b9\u6cd5\u4e2d\u8c03\u7528 ",(0,s.jsx)(r.code,{children:"trigger.ConvertToSQL(..)"})," \u4f1a\u5bfc\u81f4\u6b7b\u5faa\u73af\u3002"]})}),"\n",(0,s.jsx)(r.h3,{id:"261511-\u67e5\u770b\u6700\u8fd1\u8fd0\u884c\u8bb0\u5f55",children:"26.1.5.11 \u67e5\u770b\u6700\u8fd1\u8fd0\u884c\u8bb0\u5f55"}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.4.3 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u5728 ",(0,s.jsx)(r.code,{children:"Furion 4.8.4.3+"})," \u7248\u672c\u65b0\u589e\u4e86 ",(0,s.jsx)(r.code,{children:"GetTimelines()"})," \u65b9\u6cd5\uff0c\u53ef\u83b7\u53d6\u5185\u5b58\u4e2d\u4f5c\u4e1a\u89e6\u53d1\u5668\u6700\u8fd1\u8fd0\u884c\u7684 ",(0,s.jsx)(r.code,{children:"5"})," \u6761\u8bb0\u5f55\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'var timelines = trigger.GetTimelines(); // => [{numberOfRuns: 2, lastRunTime: "2023-01-03 14:00:08"}, {numberOfRuns: 1, lastRunTime: "2023-01-03 14:00:03"}, ...]\n'})}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"timelines"})," \u8fd4\u56de\u503c\u4e3a ",(0,s.jsx)(r.code,{children:"IEnumerable<TriggerTimeline>"})," \u7c7b\u578b\uff0c\u5176\u4e2d ",(0,s.jsx)(r.code,{children:"TriggerTimeline"})," \u7c7b\u578b\u63d0\u4f9b\u4ee5\u4e0b\u5c5e\u6027\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"TriggerTimeline"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"NumberOfRuns"}),"\uff1a\u5f53\u524d\u8fd0\u884c\u6b21\u6570\uff0c",(0,s.jsx)(r.code,{children:"long"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"LastRunTime"}),"\uff1a\u6700\u8fd1\u8fd0\u884c\u65f6\u95f4\uff0c",(0,s.jsx)(r.code,{children:"DateTime?"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"NextRunTime"}),"\uff1a\u4e0b\u4e00\u6b21\u8fd0\u884c\u65f6\u95f4\uff0c",(0,s.jsx)(r.code,{children:"DateTime?"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Status"}),"\uff1a\u4f5c\u4e1a\u89e6\u53d1\u5668\u72b6\u6001\uff0c",(0,s.jsx)(r.code,{children:"TriggerStatus"})," \u679a\u4e3e\u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Result"}),"\uff1a\u672c\u6b21\u6267\u884c\u7ed3\u679c\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ElapsedTime"}),"\uff1a\u672c\u6b21\u6267\u884c\u8017\u65f6\uff0c",(0,s.jsx)(r.code,{children:"long"})," \u7c7b\u578b\uff0c\u5355\u4f4d ",(0,s.jsx)(r.code,{children:"ms"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"261512-\u66f4\u6539\u4f5c\u4e1a\u89e6\u53d1\u5668\u89e6\u53d1\u65f6\u95f4",children:"26.1.5.12 \u66f4\u6539\u4f5c\u4e1a\u89e6\u53d1\u5668\u89e6\u53d1\u65f6\u95f4"}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.7.31 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u679c\u9700\u8981\u66f4\u6539\u4f5c\u4e1a\u89e6\u53d1\u5668\u89e6\u53d1\u65f6\u95f4\u901a\u5e38\u9700\u8981\u7a0b\u5e8f\u5458\u81ea\u884c\u7ec4\u5408 ",(0,s.jsx)(r.code,{children:".SetTriggerType<TTrigger>()"})," \u548c ",(0,s.jsx)(r.code,{children:".SetArgs(args)"}),"\uff0c\u4f46\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\u4ee3\u7801\u975e\u5e38\u4e0d\u76f4\u89c2\uff0c\u6240\u4ee5\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5217\u7684 ",(0,s.jsx)(r.code,{children:".AlterTo"})," \u65b9\u6cd5\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,11,31,76}",children:'// \u95f4\u9694 Period \u65b9\u5f0f\r\n// \u8bbe\u7f6e\u6beb\u79d2\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToPeriod(5000);\r\n// \u8bbe\u7f6e\u79d2\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToPeriodSeconds(5);\r\n// \u8bbe\u7f6e\u5206\u949f\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToPeriodMinutes(5);\r\n// \u8bbe\u7f6e\u5c0f\u65f6\u5468\u671f\uff08\u95f4\u9694\uff09\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToPeriodHours(5);\r\n\r\n// Cron \u8868\u8fbe\u5f0f\u65b9\u5f0f\r\n// \u8bbe\u7f6e Cron \u8868\u8fbe\u5f0f\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToCron("* * * * *", CronStringFormat.Default);\r\n// \u8bbe\u7f6e\u6bcf\u79d2\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToSecondly();\r\n// \u8bbe\u7f6e\u6bcf\u5206\u949f\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToMinutely();\r\n// \u8bbe\u7f6e\u6bcf\u5c0f\u65f6\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToHourly();\r\n// \u8bbe\u7f6e\u6bcf\u5929\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToDaily();\r\n// \u8bbe\u7f6e\u6bcf\u67081\u53f7\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToMonthly();\r\n// \u8bbe\u7f6e\u6bcf\u5468\u65e5\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToWeekly();\r\n// \u8bbe\u7f6e\u6bcf\u5e741\u67081\u53f7\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToYearly();\r\n// \u8bbe\u7f6e\u6bcf\u5468\u4e00\u81f3\u5468\u4e94\uff08\u5348\u591c\uff09\u5f00\u59cb\u4f5c\u4e1a\u89e6\u53d1\u5668\r\ntriggerBuilder.AlterToWorkday();\r\n\r\n// Cron \u8868\u8fbe\u5f0f Macro At \u65b9\u5f0f\r\n// \u6bcf\u7b2c 3 \u79d2\r\ntriggerBuilder.AlterToSecondlyAt(3);\r\n// \u6bcf\u7b2c 3\uff0c5\uff0c6 \u79d2\r\ntriggerBuilder.AlterToSecondlyAt(3, 5, 6);\r\n\r\n// \u6bcf\u5206\u949f\u7b2c 3 \u79d2\r\ntriggerBuilder.AlterToMinutelyAt(3);\r\n// \u6bcf\u5206\u949f\u7b2c 3\uff0c5\uff0c6 \u79d2\r\ntriggerBuilder.AlterToMinutelyAt(3, 5, 6);\r\n\r\n// \u6bcf\u5c0f\u65f6\u7b2c 3 \u5206\u949f\r\ntriggerBuilder.AlterToHourlyAt(3);\r\n// \u6bcf\u5c0f\u65f6\u7b2c 3\uff0c5\uff0c6 \u5206\u949f\r\ntriggerBuilder.AlterToHourlyAt(3, 5, 6);\r\n\r\n// \u6bcf\u5929\u7b2c 3 \u5c0f\u65f6\u6b63\uff08\u70b9\uff09\r\ntriggerBuilder.AlterToDailyAt(3);\r\n// \u6bcf\u5929\u7b2c 3\uff0c5\uff0c6 \u5c0f\u65f6\u6b63\uff08\u70b9\uff09\r\ntriggerBuilder.AlterToDailyAt(3, 5, 6);\r\n\r\n// \u6bcf\u6708\u7b2c 3 \u5929\u96f6\u70b9\u6b63\r\ntriggerBuilder.AlterToMonthlyAt(3);\r\n// \u6bcf\u6708\u7b2c 3\uff0c5\uff0c6 \u5929\u96f6\u70b9\u6b63\r\ntriggerBuilder.AlterToMonthlyAt(3, 5, 6);\r\n\r\n// \u6bcf\u5468\u661f\u671f 3 \u96f6\u70b9\u6b63\r\ntriggerBuilder.AlterToWeeklyAt(3);\r\ntriggerBuilder.AlterToWeeklyAt("WED"); // SUN\uff08\u661f\u671f\u5929\uff09\uff0cMON\uff0cTUE\uff0cWED\uff0cTHU\uff0cFRI\uff0cSAT\r\n// \u6bcf\u5468\u661f\u671f 3\uff0c5\uff0c6 \u96f6\u70b9\u6b63\r\ntriggerBuilder.AlterToWeeklyAt(3, 5, 6);\r\ntriggerBuilder.AlterToWeeklyAt("WED", "FRI", "SAT");\r\n// \u8fd8\u652f\u6301\u6df7\u5408\r\ntriggerBuilder.AlterToWeeklyAt(3, "FRI", 6);\r\n\r\n// \u6bcf\u5e74\u7b2c 3 \u6708 1 \u65e5\u96f6\u70b9\u6b63\r\ntriggerBuilder.AlterToYearlyAt(3);\r\ntriggerBuilder.AlterToYearlyAt("MAR"); // JAN\uff08\u4e00\u6708\uff09\uff0cFEB\uff0cMAR\uff0cAPR\uff0cMAY\uff0cJUN\uff0cJUL\uff0cAUG\uff0cSEP\uff0cOCT\uff0cNOV\uff0cDEC\r\n// \u6bcf\u5e74\u7b2c 3\uff0c5\uff0c6 \u6708 1 \u65e5\u96f6\u70b9\u6b63\r\ntriggerBuilder.AlterToYearlyAt(3);\r\ntriggerBuilder.AlterToYearlyAt(3, 5, 6);\r\ntriggerBuilder.AlterToYearlyAt("MAR", "MAY", "JUN");\r\n// \u8fd8\u652f\u6301\u6df7\u5408\r\ntriggerBuilder.AlterToYearlyAt(3, "MAY", 6);\r\n\r\n// \u8bbe\u7f6e\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u89e6\u53d1\u5668\r\n// \u6cdb\u578b\u65b9\u5f0f\r\ntrigger.AlterTo<CustomTrigger>();\r\ntrigger.AlterTo<CustomTrigger>(30);\r\n// \u7a0b\u5e8f\u96c6\u65b9\u5f0f\r\ntrigger.AlterTo("YourAssembly", "YourAssembly.CustomTrigger");\r\ntrigger.AlterTo("YourAssembly", "YourAssembly.CustomTrigger", 30);\r\n//\u7c7b\u578b\u65b9\u5f0f\r\ntrigger.AlterTo(typeof(CustomTrigger));\r\ntrigger.AlterTo(typeof(CustomTrigger), 30);\n'})}),"\n",(0,s.jsxs)(r.h2,{id:"2616-\u4f5c\u4e1a\u8ba1\u5212-scheduler-\u53ca\u6784\u5efa\u5668",children:["26.1.6 \u4f5c\u4e1a\u8ba1\u5212 ",(0,s.jsx)(r.code,{children:"Scheduler"})," \u53ca\u6784\u5efa\u5668"]}),"\n",(0,s.jsx)(r.h3,{id:"26161-\u5173\u4e8e\u4f5c\u4e1a\u8ba1\u5212",children:"26.1.6.1 \u5173\u4e8e\u4f5c\u4e1a\u8ba1\u5212"}),"\n",(0,s.jsxs)(r.p,{children:["\u6240\u8c13\u7684\u4f5c\u4e1a\u8ba1\u5212\uff08",(0,s.jsx)(r.code,{children:"Scheduler"}),"\uff09\u662f\u5c06\u4f5c\u4e1a\u4fe1\u606f(",(0,s.jsx)(r.code,{children:"JobDetail"}),"\uff09\uff0c\u4f5c\u4e1a\u89e6\u53d1\u5668\uff08",(0,s.jsx)(r.code,{children:"Trigger"}),"\uff09\u548c\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\uff08",(0,s.jsx)(r.code,{children:"IJob"}),"\uff09\u5173\u8054\u8d77\u6765\uff0c\u5e76\u6dfb\u52a0\u5230\u4f5c\u4e1a\u8c03\u5ea6\u5668\u4e2d\u7b49\u5f85\u8c03\u5ea6\u6267\u884c\u3002"]}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u8ba1\u5212\uff08",(0,s.jsx)(r.code,{children:"Scheduler"}),"\uff09\u7c7b\u578b\u5bf9\u5916\u662f\u4e0d\u516c\u5f00\u7684\uff0c\u4f46\u63d0\u4f9b\u4e86\u5bf9\u5e94\u7684 ",(0,s.jsx)(r.code,{children:"IScheduler"})," \u63a5\u53e3\u8fdb\u884c\u64cd\u4f5c\u3002"]}),"\n",(0,s.jsx)(r.h3,{id:"26162-\u5173\u4e8e\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668",children:"26.1.6.2 \u5173\u4e8e\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668"}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u8ba1\u5212 ",(0,s.jsx)(r.code,{children:"Scheduler"})," \u662f\u6846\u67b6\u63d0\u4f9b\u8fd0\u884c\u65f6\u7684",(0,s.jsx)(r.strong,{children:"\u5185\u90e8\u53ea\u8bfb\u7c7b\u578b"}),"\uff0c\u90a3\u4e48\u6211\u4eec\u8be5\u5982\u4f55\u521b\u5efa\u6216\u53d8\u66f4 ",(0,s.jsx)(r.code,{children:"Scheduler"})," \u5bf9\u8c61\u5462\uff1f"]}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"SchedulerBuilder"})," \u662f\u6846\u67b6\u63d0\u4f9b\u53ef\u7528\u6765\u751f\u6210\u8fd0\u884c\u65f6 ",(0,s.jsx)(r.code,{children:"Scheduler"})," \u7684\u7c7b\u578b\uff0c\u8fd9\u6837\u505a\u7684\u597d\u5904\u53ef\u907f\u514d\u5916\u90e8\u76f4\u63a5\u4fee\u6539\u8fd0\u884c\u65f6 ",(0,s.jsx)(r.code,{children:"Scheduler"})," \u6570\u636e\uff0c\u8fd8\u80fd\u5b9e\u73b0\u4efb\u4f55\u4fee\u6539\u52a8\u4f5c\u76d1\u542c\uff0c\u4e5f\u80fd\u907f\u514d\u591a\u7ebf\u7a0b\u62a2\u5360\u60c5\u51b5\u3002"]}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u8c03\u5ea6\u6a21\u5757\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u5f0f\u7528\u6765\u521b\u5efa ",(0,s.jsx)(r.code,{children:"SchedulerBuilder"})," \u5bf9\u8c61\u3002"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"Create"})," \u9759\u6001\u65b9\u6cd5\u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,4,10,16,22}",children:'// \u901a\u8fc7\u4f5c\u4e1a Id \u521b\u5efa\r\nvar schedulerBuilder = SchedulerBuilder.Create("job1");\r\n\r\n// \u901a\u8fc7\u6cdb\u578b\u65b9\u5f0f\r\nvar schedulerBuilder = SchedulerBuilder.Create<MyJob>(Triggers.PeriodSeconds(5), Triggers.Minutely());\r\nvar schedulerBuilder = SchedulerBuilder.Create<MyJob>(true, Triggers.PeriodSeconds(5), Triggers.Minutely());\r\nvar schedulerBuilder = SchedulerBuilder.Create<MyJob>("job1", Triggers.PeriodSeconds(5), Triggers.Minutely());\r\nvar schedulerBuilder = SchedulerBuilder.Create<MyJob>("job1", true, Triggers.PeriodSeconds(5), Triggers.Minutely());\r\n\r\n// \u901a\u8fc7\u7c7b\u578b\u65b9\u5f0f\r\nvar schedulerBuilder = SchedulerBuilder.Create(typeof(MyJob), Triggers.PeriodSeconds(5), Triggers.Minutely());\r\nvar schedulerBuilder = SchedulerBuilder.Create(typeof(MyJob), true, Triggers.PeriodSeconds(5), Triggers.Minutely());\r\nvar schedulerBuilder = SchedulerBuilder.Create(typeof(MyJob), "job1", Triggers.PeriodSeconds(5), Triggers.Minutely());\r\nvar schedulerBuilder = SchedulerBuilder.Create(typeof(MyJob), "job1", true, Triggers.PeriodSeconds(5), Triggers.Minutely());\r\n\r\n// \u901a\u8fc7\u59d4\u6258\u65b9\u5f0f\r\nvar schedulerBuilder = SchedulerBuilder.Create((context, stoppingToken) => {}, Triggers.PeriodSeconds(5), Triggers.Minutely());\r\nvar schedulerBuilder = SchedulerBuilder.Create((context, stoppingToken) => {}, true, Triggers.PeriodSeconds(5), Triggers.Minutely());\r\nvar schedulerBuilder = SchedulerBuilder.Create((context, stoppingToken) => {}, "job1", Triggers.PeriodSeconds(5), Triggers.Minutely());\r\nvar schedulerBuilder = SchedulerBuilder.Create((context, stoppingToken) => {}, "job1", true, Triggers.PeriodSeconds(5), Triggers.Minutely());\r\n\r\n// \u901a\u8fc7 JobBuilder \u548c 0 \u6216 N \u4e2a TriggerBuilder \u521b\u5efa\r\nvar schedulerBuilder = SchedulerBuilder.Create(\r\n JobBuilder.Create<MyJob>()\r\n , Triggers.PeriodSeconds(5), Triggers.Minutely());\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"IScheduler"})," \u63a5\u53e3\u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsx)(r.p,{children:"\u8fd9\u79cd\u65b9\u5f0f\u5e38\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u66f4\u65b0\u4f5c\u4e1a\u4fe1\u606f\u3002"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var schedulerBuilder = SchedulerBuilder.From(scheduler);\r\n\r\n//\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\r\nvar schedulerBuilder = scheduler.GetBuilder();\n"})}),"\n",(0,s.jsxs)(r.ol,{start:"3",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32\u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["\u8be5\u65b9\u5f0f\u975e\u5e38\u7075\u6d3b\uff0c\u53ef\u4ece\u914d\u7f6e\u6587\u4ef6\uff0c",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32\uff0c\u6216\u5176\u4ed6\u80fd\u591f\u8fd4\u56de ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32\u7684\u5730\u65b9\u521b\u5efa\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3,14}",children:'var schedulerBuilder = SchedulerBuilder.From(@"\r\n{\r\n\t""jobDetail"": {\r\n\t\t""jobId"": ""job1"",\r\n\t\t""groupName"": null,\r\n\t\t""jobType"": ""MyJob"",\r\n\t\t""assemblyName"": ""ConsoleApp32"",\r\n\t\t""description"": null,\r\n\t\t""concurrent"": true,\r\n\t\t""includeAnnotations"": false,\r\n\t\t""properties"": ""{}"",\r\n\t\t""updatedTime"": ""2022-12-04 11:51:00.483""\r\n\t},\r\n\t""triggers"": [{\r\n\t\t""triggerId"": ""job1_trigger1"",\r\n\t\t""jobId"": ""job1"",\r\n\t\t""triggerType"": ""Furion.Schedule.PeriodTrigger"",\r\n\t\t""assemblyName"": ""Furion"",\r\n\t\t""args"": ""[5000]"",\r\n\t\t""description"": null,\r\n\t\t""status"": 2,\r\n\t\t""startTime"": null,\r\n\t\t""endTime"": null,\r\n\t\t""lastRunTime"": ""2022-12-04 17:52:34.768"",\r\n\t\t""nextRunTime"": ""2022-12-04 17:52:39.769"",\r\n\t\t""numberOfRuns"": 1,\r\n\t\t""maxNumberOfRuns"": 0,\r\n\t\t""numberOfErrors"": 0,\r\n\t\t""maxNumberOfErrors"": 0,\r\n\t\t""numRetries"": 0,\r\n\t\t""retryTimeout"": 1000,\r\n\t\t""startNow"": true,\r\n\t\t""runOnStart"": false,\r\n\t\t""resetOnlyOnce"": true,\r\n\t\t""result"": null,\r\n\t\t""elapsedTime"": 100,\r\n\t\t""updatedTime"": ""2022-12-04 17:52:34.803""\r\n\t}]\r\n}\r\n");\n'})}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u679c\u4f7f\u7528\u7684\u662f ",(0,s.jsx)(r.code,{children:".NET7"}),"\uff0c\u53ef\u4f7f\u7528 ",(0,s.jsx)(r.code,{children:'"""'})," \u907f\u514d\u8f6c\u4e49\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3,14}",children:'var schedulerBuilder = SchedulerBuilder.From("""\r\n{\r\n "jobDetail": {\r\n "jobId": "job1",\r\n "groupName": null,\r\n "jobType": "MyJob",\r\n "assemblyName": "ConsoleApp32",\r\n "description": null,\r\n "concurrent": true,\r\n "includeAnnotations": false,\r\n "properties": "{}",\r\n "updatedTime": "2022-12-04 11:51:00.483"\r\n },\r\n "triggers": [{\r\n "triggerId": "job1_trigger1",\r\n "jobId": "job1",\r\n "triggerType": "Furion.Schedule.PeriodTrigger",\r\n "assemblyName": "Furion",\r\n "args": "[5000]",\r\n "description": null,\r\n "status": 2,\r\n "startTime": null,\r\n "endTime": null,\r\n "lastRunTime": "2022-12-04 17:52:34.768",\r\n "nextRunTime": "2022-12-04 17:52:39.769",\r\n "numberOfRuns": 1,\r\n "maxNumberOfRuns": 0,\r\n "numberOfErrors": 0,\r\n "maxNumberOfErrors": 0,\r\n "numRetries": 0,\r\n "retryTimeout": 1000,\r\n "startNow": true,\r\n "runOnStart": false,\r\n "resetOnlyOnce": true,\r\n "result": null,\r\n "elapsedTime": 10,\r\n "updatedTime": "2022-12-04 17:52:34.803"\r\n }]\r\n}\r\n""");\n'})}),"\n",(0,s.jsxs)(r.admonition,{title:"\u5173\u4e8e\u5c5e\u6027\u540d\u5339\u914d\u89c4\u5219",type:"important",children:[(0,s.jsxs)(r.p,{children:["\u652f\u6301 ",(0,s.jsx)(r.code,{children:"CamelCase\uff08\u9a7c\u5cf0\u547d\u540d\u6cd5\uff09"}),"\uff0c",(0,s.jsx)(r.code,{children:"Pascal\uff08\u5e15\u65af\u5361\u547d\u540d\u6cd5\uff09"})," \u547d\u540d\u65b9\u5f0f\u3002"]}),(0,s.jsxs)(r.p,{children:[(0,s.jsxs)(r.strong,{children:["\u4e0d\u652f\u6301 ",(0,s.jsx)(r.code,{children:"UnderScoreCase\uff08\u4e0b\u5212\u7ebf\u547d\u540d\u6cd5\uff09"})]})," \uff0c\u5982 ",(0,s.jsx)(r.code,{children:'"include_annotations": true'})]})]}),"\n",(0,s.jsxs)(r.ol,{start:"4",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8fd8\u53ef\u4ee5\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"Clone"})," \u9759\u6001\u65b9\u6cd5\u4ece\u4e00\u4e2a ",(0,s.jsx)(r.code,{children:"SchedulerBuilder"})," \u521b\u5efa"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var schedulerBuilder = SchedulerBuilder.Clone(fromSchedulerBuilder);\n"})}),"\n",(0,s.jsx)(r.admonition,{title:"\u514b\u9686\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u514b\u9686\u64cd\u4f5c\u5c06\u514b\u9686 ",(0,s.jsx)(r.code,{children:"JobBuilder"})," \u548c ",(0,s.jsx)(r.code,{children:"TriggerBuilders"}),"\uff0c\u540c\u65f6\u6301\u4e45\u5316\u884c\u4e3a\u4f1a\u88ab\u6807\u8bb0\u4e3a ",(0,s.jsx)(r.code,{children:"Appended"}),"\u3002"]})}),"\n",(0,s.jsx)(r.h3,{id:"26163-\u8bbe\u7f6e\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668",children:"26.1.6.3 \u8bbe\u7f6e\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"SchedulerBuilder"})," \u63d0\u4f9b\u4e86\u591a\u4e2a\u65b9\u6cd5\u64cd\u4f5c ",(0,s.jsx)(r.code,{children:"JobBuilder"})," \u548c ",(0,s.jsx)(r.code,{children:"TriggerBuilder"}),"\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u83b7\u53d6\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668\r\nvar jobBuilder = schedulerBuilder.GetJobBuilder();\r\n\r\n// \u83b7\u53d6\u6240\u6709\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilders = schedulerBuilder.GetTriggerBuilders();\r\n\r\n// \u83b7\u53d6\u5355\u4e2a\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nvar triggerBuilder = schedulerBuilder.GetTriggerBuilder("job1_trigger1");\r\nvar triggerBuilder = schedulerBuilder.GetTriggerBuilder("not_found_trigger_id"); // => null\r\n\r\n// \u66f4\u65b0\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668\r\nschedulerBuilder.UpdateJobBuilder(jobBuilder);\r\n// \u5982\u679c\u901a\u8fc7 .GetJobBuilder() \u65b9\u5f0f\u83b7\u53d6\uff0c\u90a3\u4e48\u53ef\u76f4\u63a5\u66f4\u65b0\uff0c\u65e0\u9700\u8c03\u7528 .UpdateJobBuilder(jobBuilder);\r\nschedulerBuilder.UpdateJobBuilder(newJobBuilder, replace: true);\r\n\r\n// \u6dfb\u52a0\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nschedulerBuilder.AddTriggerBuilder(triggerBuilder1, triggerBuilder2, ...);\r\n\r\n// \u66f4\u65b0\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\r\nschedulerBuilder.UpdateTriggerBuilder(triggerBuilder1, triggerBuilder2, ...);\r\n// \u8fd8\u53ef\u4ee5\u9009\u62e9\u8986\u76d6\u66f4\u65b0\u8fd8\u662f\u4e0d\u8986\u76d6\r\nschedulerBuilder.UpdateTriggerBuilder(new[] { triggerBuilder1, triggerBuilder2, ... }, replace: true);\r\n\r\n// \u5220\u9664\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\uff0c\u6ce8\u610f\u4e0d\u662f\u771f\u7684\u5220\u9664\uff0c\u800c\u662f\u6807\u8bb0\u4e3a Removed \u5220\u9664\u72b6\u6001\r\nschedulerBuilder.RemoveTriggerBuilder("trigger1", "trigger2", ...);\r\n\r\n// \u6e05\u9664\u6240\u6709\u4f5c\u4e1a\u89e6\u53d1\u5668\u6784\u5efa\u5668\uff0c\u6ce8\u610f\u4e0d\u662f\u771f\u7684\u5220\u9664\uff0c\u800c\u662f\u6807\u8bb0\u4e3a Removed \u5220\u9664\u72b6\u6001\r\nschedulerBuilder.ClearTriggerBuilders();\r\n\r\n// \u8f93\u51fa\u4e3a JSON \u683c\u5f0f\r\nvar json = schedulerBuilder.ConvertToJSON();\r\nvar json = schedulerBuilder.ConvertToJSON(NamingConventions.CamelCase);\r\n\r\n// \u5c06\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u8f6c\u6362\u6210\u53ef\u679a\u4e3e\u7684 Dictionary<JobBuilder, TriggerBuilder>\r\nforeach(var (jobBuilder, triggerBuilder) in schedulerBuilder.GetEnumerable())\r\n{\r\n // ....\r\n}\n'})}),"\n",(0,s.jsx)(r.h3,{id:"26164-\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u6301\u4e45\u5316\u65b9\u6cd5",children:"26.1.6.4 \u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u6301\u4e45\u5316\u65b9\u6cd5"}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668 ",(0,s.jsx)(r.code,{children:"SchedulerBuilder"})," \u63d0\u4f9b\u4e86\u4e09\u4e2a\u6807\u8bb0\u4f5c\u4e1a\u6301\u4e45\u5316\u884c\u4e3a\u7684\u65b9\u6cd5\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Appended()"}),"\uff1a\u6807\u8bb0\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u662f\u65b0\u589e\u7684\uff0c\u5c4a\u65f6\u751f\u6210\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u662f ",(0,s.jsx)(r.code,{children:"INSERT"})," \u8bed\u53e5"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Updated()"}),"\uff1a\u6807\u8bb0\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u5df2\u88ab\u66f4\u65b0\uff0c\u5c4a\u65f6\u751f\u6210\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u662f ",(0,s.jsx)(r.code,{children:"Updated"})," \u8bed\u53e5\uff0c\u5982\u679c\u6807\u8bb0\u4e3a\u6b64\u64cd\u4f5c\uff0c\u90a3\u4e48\u5f53\u524d\u4f5c\u4e1a\u8c03\u5ea6\u5668\u521d\u59cb\u5316\u65f6\u5c06\u65b0\u589e\u81f3\u5185\u5b58\u4e2d"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Removed()"}),"\uff1a\u6807\u8bb0\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u5df2\u88ab\u5220\u9664\uff0c\u5c4a\u65f6\u751f\u6210\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u662f ",(0,s.jsx)(r.code,{children:"Deleted"})," \u8bed\u53e5\uff0c\u5982\u679c\u6807\u8bb0\u4e3a\u6b64\u64cd\u4f5c\uff0c\u90a3\u4e48\u5f53\u524d\u4f5c\u4e1a\u8c03\u5ea6\u5668\u521d\u59cb\u5316\u65f6\u5c06\u4e0d\u4f1a\u6dfb\u52a0\u81f3\u8c03\u5ea6\u5668\u4e2d"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3-5}",children:'services.AddSchedule(options =>\r\n{\r\n options.AddJob(SchedulerBuilder.Create<MyJob>("job1").Appended()\r\n , SchedulerBuilder.Create<MyJob>("job2").Updated()\r\n , SchedulerBuilder.Create<MyJob>("job3").Removed());\r\n});\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u67e5\u770b\u4f5c\u4e1a\u8c03\u5ea6\u5668\u521d\u59cb\u5316\u65e5\u5fd7\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {6,8,10,12}",children:"info: 2022-12-05 12:14:42.8481157 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-05 12:14:42.8597028 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-05 12:14:42.9360896 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-05 12:14:42.9471072 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job2> successfully appended and updated to the schedule.\r\ninfo: 2022-12-05 12:14:42.9562673 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job3> successfully removed to the schedule.\r\nwarn: 2022-12-05 12:14:42.9748930 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <2> schedulers are appended.\n"})}),"\n",(0,s.jsx)(r.h3,{id:"26165-\u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa",children:"26.1.6.5 \u591a\u79cd\u683c\u5f0f\u5b57\u7b26\u4e32\u8f93\u51fa"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"Scheduler/IScheduler"})," \u548c ",(0,s.jsx)(r.code,{children:"SchedulerBuilder"})," \u90fd\u63d0\u4f9b\u4e86\u591a\u79cd\u5c06\u81ea\u8eab\u8f6c\u6362\u6210\u7279\u5b9a\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\u3002"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var json = schedulerBuilder.ConvertToJSON();\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u5b57\u7b26\u4e32\u6253\u5370\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",metastring:"showLineNumbers {2,13}",children:'{\r\n "jobDetail": {\r\n "jobId": "job1",\r\n "groupName": null,\r\n "jobType": "MyJob",\r\n "assemblyName": "ConsoleApp32",\r\n "description": null,\r\n "concurrent": true,\r\n "includeAnnotations": false,\r\n "properties": "{}",\r\n "updatedTime": "2022-12-04 11:51:00.483"\r\n },\r\n "triggers": [\r\n {\r\n "triggerId": "job1_trigger1",\r\n "jobId": "job1",\r\n "triggerType": "Furion.Schedule.PeriodTrigger",\r\n "assemblyName": "Furion",\r\n "args": "[5000]",\r\n "description": null,\r\n "status": 2,\r\n "startTime": null,\r\n "endTime": null,\r\n "lastRunTime": "2022-12-04 17:52:34.768",\r\n "nextRunTime": "2022-12-04 17:52:39.769",\r\n "numberOfRuns": 1,\r\n "maxNumberOfRuns": 0,\r\n "numberOfErrors": 0,\r\n "maxNumberOfErrors": 0,\r\n "numRetries": 0,\r\n "retryTimeout": 1000,\r\n "startNow": true,\r\n "runOnStart": false,\r\n "resetOnlyOnce": true,\r\n "result": null,\r\n "elapsedTime": 100,\r\n "updatedTime": "2022-12-04 17:52:34.803"\r\n }\r\n ]\r\n}\n'})}),"\n",(0,s.jsxs)(r.h2,{id:"2617-\u4f5c\u4e1a\u8c03\u5ea6\u5668-scheduleoptionsbuilder-\u914d\u7f6e\u9009\u9879",children:["26.1.7 \u4f5c\u4e1a\u8c03\u5ea6\u5668 ",(0,s.jsx)(r.code,{children:"ScheduleOptionsBuilder"})," \u914d\u7f6e\u9009\u9879"]}),"\n",(0,s.jsxs)(r.h3,{id:"26171-\u5173\u4e8e-scheduleoptionsbuilder",children:["26.1.7.1 \u5173\u4e8e ",(0,s.jsx)(r.code,{children:"ScheduleOptionsBuilder"})]}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"ScheduleOptionsBuilder"})," \u914d\u7f6e\u9009\u9879\u4e3b\u8981\u662f\u7528\u6765\u521d\u59cb\u5316\u4f5c\u4e1a\u8c03\u5ea6\u5668\u53ca\u76f8\u5173\u670d\u52a1\u914d\u7f6e\u7684\u3002\u53ea\u4f5c\u4e3a ",(0,s.jsx)(r.code,{children:"services.AddSchedule"})," \u670d\u52a1\u6ce8\u518c\u7684\u914d\u7f6e\u53c2\u6570\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,8-9}",children:"// \u901a\u8fc7\u59d4\u6258\u7684\u65b9\u5f0f\u914d\u7f6e\r\nservices.AddSchedule(options =>\r\n{\r\n // options \u7c7b\u578b\u4e3a ScheduleOptionsBuilder\r\n});\r\n\r\n// \u81ea\u884c\u521b\u5efa\u5bf9\u8c61\u5b9e\u4f8b\u65b9\u5f0f\u914d\u7f6e\r\nvar scheduleOptionsBuilder = new ScheduleOptionsBuilder();\r\nservices.AddSchedule(scheduleOptionsBuilder);\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"26172-scheduleoptionsbuilder-\u5185\u7f6e\u5c5e\u6027\u548c\u65b9\u6cd5",children:["26.1.7.2 ",(0,s.jsx)(r.code,{children:"ScheduleOptionsBuilder"})," \u5185\u7f6e\u5c5e\u6027\u548c\u65b9\u6cd5"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.strong,{children:"\u5185\u7f6e\u5c5e\u6027\u914d\u7f6e"})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4,7,10,13,16,21,24,29}",children:'services.AddSchedule(options =>\r\n{\r\n // \u662f\u5426\u4f7f\u7528 UTC \u65f6\u95f4\uff0c\u8be5\u914d\u7f6e\u4e3b\u8981\u7528\u6765\u4f5c\u4e3a\u4f5c\u4e1a\u8c03\u5ea6\u5668\u68c0\u67e5\u65f6\u95f4\u683c\u5f0f\u7684\u4f9d\u636e\r\n options.UseUtcTimestamp = false;\r\n\r\n // \u662f\u5426\u8f93\u51fa\u4f5c\u4e1a\u8c03\u5ea6\u5668\u65e5\u5fd7\r\n options.LogEnabled = true;\r\n\r\n // \u914d\u7f6e\u96c6\u7fa4 Id\uff0c\u9ed8\u8ba4\u503c\u4e3a\u542f\u52a8\u7a0b\u5e8f\u96c6\u7684\u540d\u79f0\r\n options.ClusterId = "cluster1";\r\n\r\n // \u914d\u7f6e\u8f93\u51fa SQL \u7684\u6570\u636e\u5e93\u7c7b\u578b\uff0cFurion 4.8.2.3+\r\n options.BuildSqlType = SqlTypes.SqlServer;\r\n\r\n // \u914d\u7f6e\u4f5c\u4e1a\u4fe1\u606f JobDetail \u76f8\u5173\u914d\u7f6e\uff0c\u5982\u914d\u7f6e\u81ea\u5b9a\u4e49 SQL \u8f93\u51fa\r\n options.JobDetail.ConvertToSQL((tableName, columnNames, jobDetail, behavior, naming) =>\r\n {\r\n });\r\n\r\n // \u542f\u7528\u4f5c\u4e1a\u6267\u884c\u65e5\u5fd7\u8f93\u51fa\uff0cFurion 4.8.3.7+ \u7248\u672c\u652f\u6301\r\n options.JobDetail.LogEnabled = true; // \u9ed8\u8ba4 false\r\n\r\n // \u914d\u7f6e\u4f5c\u4e1a\u89e6\u53d1\u5668 Trigger \u76f8\u5173\u914d\u7f6e\uff0c\u5982\u914d\u7f6e\u81ea\u5b9a\u4e49 SQL \u8f93\u51fa\r\n options.Trigger.ConvertToSQL((tableName, columnNames, trigger, behavior, naming) =>\r\n {\r\n });\r\n\r\n // \u5b9a\u4e49\u672a\u6355\u83b7\u7684\u5f02\u5e38\uff0c\u901a\u5e38\u662f Task \u5f02\u5e38\r\n options.UnobservedTaskExceptionHandler = (obj, args) =>\r\n {\r\n };\r\n});\n'})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.strong,{children:"\u5185\u7f6e\u65b9\u6cd5\u914d\u7f6e"})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4-18,21-28,31,34,37,40}",children:'services.AddSchedule(options =>\r\n{\r\n // \u6dfb\u52a0\u4f5c\u4e1a\r\n options.AddJob(schedulerBuilder);\r\n options.AddJob(schedulerBuilder, schedulerBuilder1, ...); // Furion 4.8.2.4+\r\n options.AddJob(jobBuilder, triggerBuilder, ...);\r\n options.AddJob<MyJob>(triggerBuilder, ...);\r\n options.AddJob<MyJob>("\u4f5c\u4e1a Id", triggerBuilder, ...);\r\n options.AddJob<MyJob>("\u4f5c\u4e1a Id", concurrent: true, triggerBuilder, ...);\r\n options.AddJob<MyJob>(concurrent: true, triggerBuilder, ...);\r\n options.AddJob(typeof(MyJob), triggerBuilder, ...);\r\n options.AddJob(typeof(MyJob), "\u4f5c\u4e1a Id", triggerBuilder, ...);\r\n options.AddJob(typeof(MyJob), "\u4f5c\u4e1a Id", concurrent: true, triggerBuilder, ...);\r\n options.AddJob(typeof(MyJob), concurrent: true, triggerBuilder, ...);\r\n options.AddJob((context, stoppingToken) => {}, triggerBuilder, ...);\r\n options.AddJob((context, stoppingToken) => {}, "\u4f5c\u4e1a Id", triggerBuilder, ...);\r\n options.AddJob((context, stoppingToken) => {}, "\u4f5c\u4e1a Id", concurrent: true, triggerBuilder, ...);\r\n options.AddJob((context, stoppingToken) => {}, concurrent: true, triggerBuilder, ...);\r\n\r\n // \u6dfb\u52a0 HTTP Job\uff0cFurion 4.8.7.7+\r\n options.AddHttpJob(request => {}, triggerBuilder, ...);\r\n options.AddHttpJob(request => {}, "\u4f5c\u4e1a Id", triggerBuilder, ...);\r\n options.AddHttpJob(request => {}, "\u4f5c\u4e1a Id", concurrent: true, triggerBuilder, ...);\r\n options.AddHttpJob(request => {}, concurrent: true, triggerBuilder, ...);\r\n options.AddHttpJob<YourHttpJob>(request => {}, triggerBuilder, ...);\r\n options.AddHttpJob<YourHttpJob>(request => {}, "\u4f5c\u4e1a Id", triggerBuilder, ...);\r\n options.AddHttpJob<YourHttpJob>(request => {}, "\u4f5c\u4e1a Id", concurrent: true, triggerBuilder, ...);\r\n options.AddHttpJob<YourHttpJob>(request => {}, concurrent: true, triggerBuilder, ...);\r\n\r\n // \u6dfb\u52a0\u4f5c\u4e1a\u6267\u884c\u76d1\u89c6\u5668\r\n options.AddMonitor<YourJobMonitor>();\r\n\r\n // \u6dfb\u52a0\u4f5c\u4e1a\u6267\u884c\u5668\r\n options.AddExecutor<YourJobMonitor>();\r\n\r\n // \u6dfb\u52a0\u4f5c\u4e1a\u6301\u4e45\u5316\u5668\r\n options.AddPersistence<YourJobPersistence>();\r\n\r\n // \u6ce8\u518c\u4f5c\u4e1a\u96c6\u7fa4\u670d\u52a1\r\n options.AddClusterServer<YourClusterServer>();\r\n});\n'})}),"\n",(0,s.jsxs)(r.h2,{id:"2618-\u4f5c\u4e1a\u76d1\u89c6\u5668-ijobmonitor",children:["26.1.8 \u4f5c\u4e1a\u76d1\u89c6\u5668 ",(0,s.jsx)(r.code,{children:"IJobMonitor"})]}),"\n",(0,s.jsxs)(r.p,{children:["\u8c03\u5ea6\u4f5c\u4e1a\u670d\u52a1\u63d0\u4f9b\u4e86 ",(0,s.jsx)(r.code,{children:"IJobMonitor"})," \u76d1\u89c6\u5668\u63a5\u53e3\uff0c\u5b9e\u73b0\u8be5\u63a5\u53e3\u53ef\u4ee5\u76d1\u89c6\u6240\u6709\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u6267\u884c\u4e8b\u4ef6\uff0c\u5305\u62ec ",(0,s.jsx)(r.code,{children:"\u6267\u884c\u4e4b\u524d\u3001\u6267\u884c\u4e4b\u540e\uff0c\u6267\u884c\u5f02\u5e38"}),"\u3002"]}),"\n",(0,s.jsx)(r.p,{children:"\u901a\u8fc7\u4f5c\u4e1a\u76d1\u89c6\u5668\u53ef\u4ee5\u5b9e\u73b0\u4f5c\u4e1a\u5b8c\u6574\u751f\u547d\u5468\u671f\u63a7\u5236\uff0c\u8fd8\u80fd\u5b9e\u73b0\u4f5c\u4e1a\u6267\u884c\u5f02\u5e38\u53d1\u9001\u77ed\u4fe1\u6216\u90ae\u4ef6\u901a\u77e5\u7ba1\u7406\u5458\u6216\u9879\u76ee\u7ef4\u62a4\u8005\u3002"}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u6dfb\u52a0 ",(0,s.jsx)(r.code,{children:"YourJobMonitor"}),"\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,9,15}",children:'public class YourJobMonitor : IJobMonitor\r\n{\r\n private readonly ILogger<YourJobMonitor> _logger;\r\n public YourJobMonitor(ILogger<YourJobMonitor> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public Task OnExecutingAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation("\u6267\u884c\u4e4b\u524d\uff1a{context}", context);\r\n return Task.CompletedTask;\r\n }\r\n\r\n public Task OnExecutedAsync(JobExecutedContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation("\u6267\u884c\u4e4b\u540e\uff1a{context}", context);\r\n\r\n if (context.Exception != null)\r\n {\r\n _logger.LogError(context.Exception, "\u6267\u884c\u51fa\u9519\u5566\uff1a{context}", context);\r\n }\r\n\r\n return Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.p,{children:["\u6700\u540e\uff0c\u5728\u6ce8\u518c ",(0,s.jsx)(r.code,{children:"Schedule"})," \u670d\u52a1\u4e2d\u6ce8\u518c ",(0,s.jsx)(r.code,{children:"YourJobMonitor"}),"\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4}",children:"services.AddSchedule(options =>\r\n{\r\n // \u6dfb\u52a0\u4f5c\u4e1a\u6267\u884c\u76d1\u89c6\u5668\r\n options.AddMonitor<YourJobMonitor>();\r\n});\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {12,16,26,28}",children:"info: 2022-12-05 14:09:47.2337395 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-05 14:09:47.2401561 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-05 14:09:47.2780446 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-05 14:09:47.2810119 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-05 14:09:47.2941716 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-05 14:09:52.3190129 +08:00 \u661f\u671f\u4e00 L ConsoleApp32.YourJobMonitor[0] #4\r\n \u6267\u884c\u4e4b\u524d\uff1a<job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:09:52.241 -> 2022-12-05 14:09:57.260\r\ninfo: 2022-12-05 14:09:52.3240208 +08:00 \u661f\u671f\u4e00 L MyJob[0] #4\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:09:52.241 -> 2022-12-05 14:09:57.260\r\nfail: 2022-12-05 14:09:52.5253398 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #4\r\n Error occurred executing <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:09:52.241 -> 2022-12-05 14:09:57.260.\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.Exception: \u6a21\u62df\u51fa\u9519\r\n at MyJob.ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) in D:\\Workplaces\\Study\\CSharp\\ConsoleApp32\\ConsoleApp32\\Program.cs:line 28\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass23_3.<<BackgroundProcessing>b__3>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 220\r\n --- End of stack trace from previous location ---\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 87\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass23_2.<<BackgroundProcessing>b__2>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 218\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\ninfo: 2022-12-05 14:09:52.5288429 +08:00 \u661f\u671f\u4e00 L ConsoleApp32.YourJobMonitor[0] #4\r\n \u6267\u884c\u4e4b\u540e\uff1a<job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:09:52.241 -> 2022-12-05 14:09:57.260\r\nfail: 2022-12-05 14:09:52.5318526 +08:00 \u661f\u671f\u4e00 L ConsoleApp32.YourJobMonitor[0] #4\r\n \u6267\u884c\u51fa\u9519\u5566\uff1a<job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:09:52.241 -> 2022-12-05 14:09:57.260\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.InvalidOperationException: Error occurred executing <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:09:52.241 -> 2022-12-05 14:09:57.260.\r\n ---\x3e System.Exception: \u6a21\u62df\u51fa\u9519\r\n at MyJob.ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) in D:\\Workplaces\\Study\\CSharp\\ConsoleApp32\\ConsoleApp32\\Program.cs:line 28\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass23_3.<<BackgroundProcessing>b__3>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 220\r\n --- End of stack trace from previous location ---\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 87\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass23_2.<<BackgroundProcessing>b__2>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 218\r\n --- End of inner exception stack trace ---\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"})}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u8fd8\u53ef\u4ee5\u8bbe\u7f6e\u6267\u884c\u5931\u8d25\u91cd\u8bd5\uff0c\u5982\uff1a"})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:"services.AddSchedule(options =>\r\n{\r\n options.AddJob<MyJob>(Triggers.PeriodSeconds(5).SetNumRetries(3)); // \u91cd\u8bd5 3 \u6b21\r\n options.AddMonitor<YourJobMonitor>();\r\n});\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {12,16,20,24,28,39,41}",children:"info: 2022-12-05 14:25:15.9316915 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-05 14:25:15.9391765 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-05 14:25:15.9737767 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-05 14:25:15.9754882 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-05 14:25:15.9892059 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-05 14:25:21.0056685 +08:00 \u661f\u671f\u4e00 L ConsoleApp32.YourJobMonitor[0] #4\r\n \u6267\u884c\u4e4b\u524d\uff1a<job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949\r\ninfo: 2022-12-05 14:25:21.0140485 +08:00 \u661f\u671f\u4e00 L MyJob[0] #4\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949\r\nwarn: 2022-12-05 14:25:21.0754973 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #4\r\n Retrying 1/3 times for <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949\r\ninfo: 2022-12-05 14:25:22.0935914 +08:00 \u661f\u671f\u4e00 L MyJob[0] #4\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949\r\nwarn: 2022-12-05 14:25:22.1574937 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #4\r\n Retrying 2/3 times for <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949\r\ninfo: 2022-12-05 14:25:23.1666732 +08:00 \u661f\u671f\u4e00 L MyJob[0] #4\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949\r\nwarn: 2022-12-05 14:25:23.2213212 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #4\r\n Retrying 3/3 times for <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949\r\ninfo: 2022-12-05 14:25:24.2337356 +08:00 \u661f\u671f\u4e00 L MyJob[0] #4\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949\r\nfail: 2022-12-05 14:25:24.3832385 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #4\r\n Error occurred executing <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949.\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.Exception: \u6a21\u62df\u51fa\u9519\r\n at MyJob.ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) in D:\\Workplaces\\Study\\CSharp\\ConsoleApp32\\ConsoleApp32\\Program.cs:line 28\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass23_3.<<BackgroundProcessing>b__3>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 220\r\n --- End of stack trace from previous location ---\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 99\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 110\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass23_2.<<BackgroundProcessing>b__2>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 218\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\ninfo: 2022-12-05 14:25:24.3857991 +08:00 \u661f\u671f\u4e00 L ConsoleApp32.YourJobMonitor[0] #4\r\n \u6267\u884c\u4e4b\u540e\uff1a<job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949\r\nfail: 2022-12-05 14:25:24.3888126 +08:00 \u661f\u671f\u4e00 L ConsoleApp32.YourJobMonitor[0] #4\r\n \u6267\u884c\u51fa\u9519\u5566\uff1a<job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.InvalidOperationException: Error occurred executing <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:25:20.937 -> 2022-12-05 14:25:25.949.\r\n ---\x3e System.Exception: \u6a21\u62df\u51fa\u9519\r\n at MyJob.ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) in D:\\Workplaces\\Study\\CSharp\\ConsoleApp32\\ConsoleApp32\\Program.cs:line 28\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass23_3.<<BackgroundProcessing>b__3>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 220\r\n --- End of stack trace from previous location ---\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 99\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 110\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass23_2.<<BackgroundProcessing>b__2>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 218\r\n --- End of inner exception stack trace ---\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"26181-\u5173\u4e8e\u53c2\u6570-jobexecutioncontext",children:["26.1.8.1 \u5173\u4e8e\u53c2\u6570 ",(0,s.jsx)(r.code,{children:"JobExecutionContext"})]}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"IJobMonitor"})," \u63d0\u4f9b\u7684 ",(0,s.jsx)(r.code,{children:"OnExecutingAsync"})," \u548c ",(0,s.jsx)(r.code,{children:"OnExecutedAsync"})," \u63a5\u53e3\u65b9\u6cd5\u90fd\u5305\u542b\u4e00\u4e2a ",(0,s.jsx)(r.code,{children:"context"})," \u53c2\u6570\uff0c\u524d\u8005\u662f ",(0,s.jsx)(r.code,{children:"JobExecutingContext"}),"\uff0c\u540e\u8005\u662f ",(0,s.jsx)(r.code,{children:"JobExecutedContext"}),"\uff0c\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u5171\u540c\u7684\u57fa\u7c7b ",(0,s.jsx)(r.code,{children:"JobExecutionContext"}),"\u3002"]}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"JobExecutionContext"})," \u63d0\u4f9b\u4e86\u4ee5\u4e0b\u516c\u5171\u5c5e\u6027\u548c\u516c\u5171\u65b9\u6cd5:"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"JobExecutionContext"})," \u5c5e\u6027\u5217\u8868"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"JobId"}),"\uff1a\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"Id"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"TriggerId"}),"\uff1a\u5f53\u524d\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Id"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"JobDetail"}),"\uff1a\u4f5c\u4e1a\u4fe1\u606f"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Trigger"}),"\uff1a\u4f5c\u4e1a\u89e6\u53d1\u5668"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"OccurrenceTime"}),"\uff1a",(0,s.jsx)(r.strong,{children:"\u4f5c\u4e1a\u8ba1\u5212\u89e6\u53d1\u65f6\u95f4\uff0c\u6700\u51c6\u786e\u7684\u8bb0\u5f55\u65f6\u95f4"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"RunId"}),"\uff1a\u672c\u6b21\u4f5c\u4e1a\u6267\u884c\u552f\u4e00 ",(0,s.jsx)(r.code,{children:"Id"}),"\uff0c",(0,s.jsx)(r.code,{children:"Furion 4.8.5.1+"})," \u63d0\u4f9b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Result"}),"\uff1a\u8bbe\u7f6e/\u8bfb\u53d6\u672c\u6b21\u4f5c\u4e1a\u6267\u884c\u7ed3\u679c\uff0c",(0,s.jsx)(r.code,{children:"Furion 4.8.7.7+"})," \u63d0\u4f9b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ServiceProvider"}),"\uff1a\u670d\u52a1\u63d0\u4f9b\u5668\uff0c",(0,s.jsx)(r.code,{children:"Furion 4.8.7.10+"})," \u63d0\u4f9b"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"JobExecutionContext"})," \u65b9\u6cd5\u5217\u8868"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:".ConvertToJSON(naming)"}),"\uff1a\u5c06\u4f5c\u4e1a\u8ba1\u5212\u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:".ToString()"}),"\uff1a\u5c06\u4f5c\u4e1a\u6267\u884c\u4fe1\u606f\u8f93\u51fa\u4e3a\u7b80\u8981\u5b57\u7b26\u4e32"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)("p",{}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.strong,{children:(0,s.jsx)(r.code,{children:"JobExecutingContext"})})," \u5728\u57fa\u7c7b\u57fa\u7840\u4e0a\u62d3\u5c55\u4e86 ",(0,s.jsx)(r.code,{children:"ExecutingTime"})," \u5c5e\u6027\uff1a","\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ExecutingTime"}),"\uff1a\u6267\u884c\u524d\u65f6\u95f4"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.strong,{children:(0,s.jsx)(r.code,{children:"JobExecutedContext"})})," \u5219\u5728\u57fa\u7c7b\u57fa\u7840\u4e0a\u62d3\u5c55\u4e86 ",(0,s.jsx)(r.code,{children:"ExecutedTime"})," \u548c ",(0,s.jsx)(r.code,{children:"Exception"})," \u5c5e\u6027\uff1a","\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ExecutedTime"}),"\uff1a\u6267\u884c\u540e\u65f6\u95f4"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Exception"}),"\uff1a\u6267\u884c\u5f02\u5e38"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.h2,{id:"2619-\u4f5c\u4e1a\u6267\u884c\u5668-ijobexecutor",children:["26.1.9 \u4f5c\u4e1a\u6267\u884c\u5668 ",(0,s.jsx)(r.code,{children:"IJobExecutor"})]}),"\n",(0,s.jsxs)(r.p,{children:["\u8c03\u5ea6\u4f5c\u4e1a\u670d\u52a1\u63d0\u4f9b\u4e86 ",(0,s.jsx)(r.code,{children:"IJobExecutor"})," \u6267\u884c\u5668\u63a5\u53e3\uff0c\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u5904\u7406\u51fd\u6570\u6267\u884c\u7b56\u7565\uff0c\u5982 ",(0,s.jsx)(r.code,{children:"\u8d85\u65f6\u63a7\u5236\uff0c\u5931\u8d25\u91cd\u8bd5\u7b49\u7b49"}),"\u3002"]}),"\n",(0,s.jsx)(r.h3,{id:"26191-\u5b9e\u73b0\u91cd\u8bd5\u7b56\u7565",children:"26.1.9.1 \u5b9e\u73b0\u91cd\u8bd5\u7b56\u7565"}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u6dfb\u52a0 ",(0,s.jsx)(r.code,{children:"YourJobExecutor"}),"\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,12,14,17-20}",children:'public class YourJobExecutor : IJobExecutor\r\n{\r\n private readonly ILogger<YourJobExecutor> _logger;\r\n public YourJobExecutor(ILogger<YourJobExecutor> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, IJob jobHandler, CancellationToken stoppingToken)\r\n {\r\n // \u5b9e\u73b0\u5931\u8d25\u91cd\u8bd5\u7b56\u7565\uff0c\u5982\u5931\u8d25\u91cd\u8bd5 3 \u6b21\r\n await Retry.InvokeAsync(async () =>\r\n {\r\n await jobHandler.ExecuteAsync(context, stoppingToken);\r\n }, 3, 1000\r\n // \u6bcf\u6b21\u91cd\u8bd5\u8f93\u51fa\u65e5\u5fd7\r\n , retryAction: (total, times) =>\r\n {\r\n _logger.LogWarning("Retrying {current}/{times} times for {context}", times, total, context);\r\n });\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.p,{children:["\u63a5\u7740\u6a21\u62df ",(0,s.jsx)(r.code,{children:"MyJob"})," \u6267\u884c\u51fa\u9519\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,13}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context}");\r\n\r\n throw new Exception("\u6a21\u62df\u51fa\u9519");\r\n return Task.CompletedTask;\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.p,{children:["\u6700\u540e\uff0c\u5728\u6ce8\u518c ",(0,s.jsx)(r.code,{children:"Schedule"})," \u670d\u52a1\u4e2d\u6ce8\u518c ",(0,s.jsx)(r.code,{children:"YourJobExecutor"}),"\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4}",children:"services.AddSchedule(options =>\r\n{\r\n // \u6dfb\u52a0\u4f5c\u4e1a\u6267\u884c\u5668\r\n options.AddExecutor<YourJobExecutor>();\r\n});\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {14,18,22}",children:"info: 2022-12-05 14:36:41.2085688 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-05 14:36:41.2162510 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-05 14:36:41.2885816 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-05 14:36:41.2912130 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-05 14:36:41.3102057 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-05 14:36:46.3329097 +08:00 \u661f\u671f\u4e00 L MyJob[0] #13\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:36:46.249 -> 2022-12-05 14:36:51.274\r\nwarn: 2022-12-05 14:36:46.3910063 +08:00 \u661f\u671f\u4e00 L ConsoleApp32.YourJobExecutor[0] #13\r\n Retrying 1/3 times for <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:36:46.249 -> 2022-12-05 14:36:51.274\r\ninfo: 2022-12-05 14:36:47.4014898 +08:00 \u661f\u671f\u4e00 L MyJob[0] #13\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:36:46.249 -> 2022-12-05 14:36:51.274\r\nwarn: 2022-12-05 14:36:47.4471172 +08:00 \u661f\u671f\u4e00 L ConsoleApp32.YourJobExecutor[0] #13\r\n Retrying 2/3 times for <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:36:46.249 -> 2022-12-05 14:36:51.274\r\ninfo: 2022-12-05 14:36:48.4539737 +08:00 \u661f\u671f\u4e00 L MyJob[0] #13\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:36:46.249 -> 2022-12-05 14:36:51.274\r\nwarn: 2022-12-05 14:36:48.4880918 +08:00 \u661f\u671f\u4e00 L ConsoleApp32.YourJobExecutor[0] #13\r\n Retrying 3/3 times for <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:36:46.249 -> 2022-12-05 14:36:51.274\r\ninfo: 2022-12-05 14:36:49.4984333 +08:00 \u661f\u671f\u4e00 L MyJob[0] #13\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:36:46.249 -> 2022-12-05 14:36:51.274\r\nfail: 2022-12-05 14:36:49.6714485 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #13\r\n Error occurred executing <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 14:36:46.249 -> 2022-12-05 14:36:51.274.\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.Exception: \u6a21\u62df\u51fa\u9519\r\n at MyJob.ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) in D:\\Workplaces\\Study\\CSharp\\ConsoleApp32\\ConsoleApp32\\Program.cs:line 31\r\n at ConsoleApp32.YourJobExecutor.<>c__DisplayClass2_0.<<ExecuteAsync>b__0>d.MoveNext() in D:\\Workplaces\\Study\\CSharp\\ConsoleApp32\\ConsoleApp32\\YourJobExecutor.cs:line 20\r\n --- End of stack trace from previous location ---\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 99\r\n at Furion.FriendlyException.Retry.InvokeAsync(Func`1 action, Int32 numRetries, Int32 retryTimeout, Boolean finalThrow, Type[] exceptionTypes, Func`2 fallbackPolicy, Action`2 retryAction) in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\FriendlyException\\Retry.cs:line 110\r\n at ConsoleApp32.YourJobExecutor.ExecuteAsync(JobExecutingContext context, IJob jobHandler, CancellationToken stoppingToken) in D:\\Workplaces\\Study\\CSharp\\ConsoleApp32\\ConsoleApp32\\YourJobExecutor.cs:line 18\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass23_2.<<BackgroundProcessing>b__2>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 232\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"})}),"\n",(0,s.jsx)(r.h3,{id:"26192-\u5b9e\u73b0\u8d85\u65f6\u63a7\u5236",children:"26.1.9.2 \u5b9e\u73b0\u8d85\u65f6\u63a7\u5236"}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u6dfb\u52a0 ",(0,s.jsx)(r.code,{children:"YourJobExecutor"}),"\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {12}",children:"public class YourJobExecutor : IJobExecutor\r\n{\r\n private readonly ILogger<YourJobExecutor> _logger;\r\n public YourJobExecutor(ILogger<YourJobExecutor> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, IJob jobHandler, CancellationToken stoppingToken)\r\n {\r\n await jobHandler.ExecuteAsync(context, stoppingToken)\r\n .WaitAsync(TimeSpan.FromMilliseconds(3000)); // \u8bbe\u7f6e 3 \u79d2\u8d85\u65f6\r\n }\r\n}\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u63a5\u7740\u6a21\u62df ",(0,s.jsx)(r.code,{children:"MyJob"})," \u6267\u884c\u8d85\u65f6\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {12}",children:'public class MyJob : IJob\r\n{\r\n private readonly ILogger<MyJob> _logger;\r\n public MyJob(ILogger<MyJob> logger)\r\n {\r\n _logger = logger;\r\n }\r\n\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n _logger.LogInformation($"{context}");\r\n await Task.Delay(6000); // \u6a21\u62df\u8017\u65f6 6 \u79d2\r\n }\r\n}\n'})}),"\n",(0,s.jsx)(r.p,{children:"\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {16}",children:"info: 2022-12-20 13:57:01.7251541 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-20 13:57:01.7336016 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-20 13:57:02.2846096 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-20 13:57:02.3448819 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-20 13:57:02.3800053 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-20 13:57:07.3261111 +08:00 \u661f\u671f\u4e8c L MyJob[0] #14\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-20 13:57:07.240 -> 2022-12-20 13:57:12.260\r\nfail: 2022-12-20 13:57:10.5743871 +08:00 \u661f\u671f\u4e8c L System.Logging.ScheduleService[0] #14\r\n Error occurred executing <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-20 13:57:07.240 -> 2022-12-20 13:57:12.260.\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n System.TimeoutException: The operation has timed out.\r\n at YourJobExecutor.ExecuteAsync(JobExecutingContext context, IJob jobHandler, CancellationToken stoppingToken) in D:\\Workplaces\\Study\\CSharp\\ConsoleApp32\\ConsoleApp32\\Program.cs:line 41\r\n at Furion.Schedule.ScheduleHostedService.<>c__DisplayClass23_2.<<BackgroundProcessing>b__2>d.MoveNext() in D:\\Workplaces\\OpenSources\\Furion\\framework\\Furion\\Schedule\\HostedServices\\ScheduleHostedService.cs:line 234\r\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"})}),"\n",(0,s.jsxs)(r.admonition,{type:"tip",children:[(0,s.jsxs)(r.mdxAdmonitionTitle,{children:["\u5173\u4e8e ",(0,s.jsx)(r.code,{children:"WaitAsync"})," \u8bf4\u660e"]}),(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"WaitAsync"})," \u662f ",(0,s.jsx)(r.code,{children:".NET6+"})," \u65b0\u589e\u7684 ",(0,s.jsx)(r.code,{children:"Task"})," \u62d3\u5c55\u65b9\u6cd5\uff0c\u5982\u9700\u5728 ",(0,s.jsx)(r.code,{children:".NET5"})," \u4e2d\u652f\u6301\uff0c\u53ef\u6dfb\u52a0\u4ee5\u4e0b\u62d3\u5c55\uff1a"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'public static async Task WaitAsync(this Task task, TimeSpan timeout)\r\n{\r\n using var timeoutCancellationTokenSource = new CancellationTokenSource();\r\n var delayTask = Task.Delay(timeout, timeoutCancellationTokenSource.Token);\r\n\r\n if(await Task.WhenAny(task, delayTask) == task)\r\n {\r\n timeoutCancellationTokenSource.Cancel();\r\n await task;\r\n }\r\n else\r\n {\r\n throw new TimeoutException("The operation has timed out.")\r\n }\r\n}\n'})})]}),"\n",(0,s.jsx)(r.h3,{id:"26193-\u66f4\u591a\u63a7\u5236",children:"26.1.9.3 \u66f4\u591a\u63a7\u5236"}),"\n",(0,s.jsx)(r.p,{children:"\u4f5c\u4e1a\u6267\u884c\u5668\u529f\u80fd\u8fdc\u4e0d\u6b62\u4e8e\u6b64\uff0c\u901a\u8fc7\u81ea\u5b9a\u4e49\u4f5c\u4e1a\u6267\u884c\u5668\u8fd8\u53ef\u4ee5\u5b9e\u73b0\u5206\u7247\u4f5c\u4e1a\uff0c\u5173\u8054\u5b50\u4f5c\u4e1a\uff0c\u6545\u969c\u8f6c\u79fb\uff0c\u96c6\u7fa4\u7b49\u63a7\u5236\u3002"}),"\n",(0,s.jsxs)(r.h2,{id:"26110-\u4f5c\u4e1a\u8ba1\u5212\u5de5\u5382-ischedulerfactory",children:["26.1.10 \u4f5c\u4e1a\u8ba1\u5212\u5de5\u5382 ",(0,s.jsx)(r.code,{children:"ISchedulerFactory"})]}),"\n",(0,s.jsx)(r.p,{children:"\u4f5c\u4e1a\u8ba1\u5212\u5de5\u5382\u63d0\u4f9b\u4e86\u7a0b\u5e8f\u8fd0\u884c\u65f6\u64cd\u4f5c\u4f5c\u4e1a\u8c03\u5ea6\u5668\uff0c\u4f5c\u4e1a\u8ba1\u5212\u7b49\u8bf8\u591a\u65b9\u6cd5\u3002"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"ISchedulerFactory"})," \u88ab\u6ce8\u518c\u4e3a ",(0,s.jsx)(r.code,{children:"\u5355\u4f8b"})," \u670d\u52a1\uff0c\u5141\u8bb8\u5728\u4efb\u4f55\u53ef\u4f9d\u8d56\u6ce8\u5165\u7684\u670d\u52a1\u83b7\u53d6\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4,8,11,16}",children:"public class YourService: IYourService\r\n{\r\n private readonly ISchedulerFactory _schedulerFactory;\r\n public YourService(ISchedulerFactory schedulerFactory)\r\n {\r\n _schedulerFactory = schedulerFactory;\r\n\r\n // \u4e5f\u53ef\u4ee5\u901a\u8fc7 App.GetService<ISchedulerFactory>() \u83b7\u53d6\r\n }\r\n\r\n public void SomeMethod([FromServices]ISchedulerFactory schedulerFactory)\r\n {\r\n }\r\n\r\n // .NET7+ \u6216 Furion 4.8.0+\r\n public void SomeMethod(ISchedulerFactory schedulerFactory)\r\n {\r\n }\r\n}\n"})}),"\n",(0,s.jsx)(r.h3,{id:"261101-\u67e5\u627e\u6240\u6709\u4f5c\u4e1a",children:"26.1.10.1 \u67e5\u627e\u6240\u6709\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,5,9,13}",children:'// \u67e5\u627e\u6240\u6709\u4f5c\u4e1a\uff0c\u5305\u62ec JobType == null \u7684\u975e\u6709\u6548\u4f5c\u4e1a\r\nvar jobs = _schedulerFactory.GetJobs();\r\nvar jobsOfModels = _schedulerFactory.GetJobsOfModels();\r\n\r\n// \u67e5\u627e\u7279\u5b9a\u5206\u7ec4\u7684\u4f5c\u4e1a\uff0c\u5305\u62ec JobType == null \u7684\u975e\u6709\u6548\u4f5c\u4e1a\r\nvar jobs = _schedulerFactory.GetJobs("group1");\r\nvar jobsOfModels = _schedulerFactory.GetJobsOfModels("group1");\r\n\r\n// \u67e5\u627e\u6240\u6709\u4f5c\u4e1a\uff0c\u4ec5 JobType != null \u6709\u6548\u4f5c\u4e1a\r\nvar jobs = _schedulerFactory.GetJobs(active: true);\r\nvar jobsOfModels = _schedulerFactory.GetJobsOfModels(active: true);\r\n\r\n// \u67e5\u627e\u7279\u5b9a\u5206\u7ec4\u7684\u4f5c\u4e1a\uff0c\u4ec5 JobType != null \u6709\u6548\u4f5c\u4e1a\r\nvar jobs = _schedulerFactory.GetJobs("group1", true);\r\nvar jobsOfModels = _schedulerFactory.GetJobsOfModels("group1", true);\n'})}),"\n",(0,s.jsx)(r.h3,{id:"261102-\u67e5\u627e\u4e0b\u4e00\u6279\u89e6\u53d1\u7684\u4f5c\u4e1a",children:"26.1.10.2 \u67e5\u627e\u4e0b\u4e00\u6279\u89e6\u53d1\u7684\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,5}",children:'// \u67e5\u627e\u4e0b\u4e00\u6279\u89e6\u53d1\u7684\u4f5c\u4e1a\r\nvar nextRunJobs = _schedulerFactory.GetNextRunJobs(DateTime.Now);\r\nvar nextRunJobsOfModels = _schedulerFactory.GetNextRunJobsOfModels(DateTime.Now);\r\n\r\n// \u67e5\u627e\u7279\u5b9a\u5206\u7ec4\u4e0b\u4e00\u6279\u89e6\u53d1\u7684\u4f5c\u4e1a\r\nvar nextRunJobs = _schedulerFactory.GetNextRunJobs(DateTime.Now, "group1");\r\nvar nextRunJobsOfModels = _schedulerFactory.GetNextRunJobsOfModels(DateTime.Now, "group1");\n'})}),"\n",(0,s.jsx)(r.h3,{id:"261103-\u83b7\u53d6\u5355\u4e2a\u4f5c\u4e1a",children:"26.1.10.3 \u83b7\u53d6\u5355\u4e2a\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,6}",children:'// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = _schedulerFactory.TryGetJob("job1", out var scheduler); // \u5982\u679c\u5b58\u5728\u8fd4\u56de => ScheduleResult.Succeed\r\nvar scheduleResult = _schedulerFactory.TryGetJob("not_found", out var scheduler); // => ScheduleResult.NotFound\r\nvar scheduleResult = _schedulerFactory.TryGetJob("", out var scheduler); // => ScheduleResult.NotIdentify\r\n\r\n// \u8fd4\u56de IScheduler \u7c7b\u578b\r\nvar scheduler = _schedulerFactory.GetJob("job1"); // \u5982\u679c\u5b58\u5728\u8fd4\u56de IScheduler\r\nvar scheduler = _schedulerFactory.GetJob("not_found"); // => null\r\nvar scheduler = _schedulerFactory.GetJob(""); // => null\n'})}),"\n",(0,s.jsx)(r.h3,{id:"261104-\u4fdd\u5b58\u4f5c\u4e1a",children:"26.1.10.4 \u4fdd\u5b58\u4f5c\u4e1a"}),"\n",(0,s.jsxs)(r.p,{children:["\u4fdd\u5b58\u4f5c\u4e1a\u662f\u6846\u67b6\u63d0\u4f9b\u5f3a\u5927\u4e14\u7b80\u5355\u7684\u65b9\u6cd5\uff0c\u652f\u6301 ",(0,s.jsx)(r.code,{children:"\u65b0\u589e"}),"\uff0c",(0,s.jsx)(r.code,{children:"\u7f16\u8f91"}),"\uff0c",(0,s.jsx)(r.code,{children:"\u5220\u9664"})," \u4f5c\u4e1a\uff0c\u4e5f\u5c31\u662f\u4e09\u5927\u64cd\u4f5c\u90fd\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u6b64\u65b9\u6cd5\u76f4\u63a5\u64cd\u4f5c\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = _schedulerFactory.TrySaveJob(schedulerBuilder, out var scheduler);\r\n\r\n// \u65e0\u8fd4\u56de\u503c\uff0c\u652f\u6301\u591a\u4e2a\r\n_schedulerFactory.SaveJob(schedulerBuilder1, schedulerBuilder2, ...)\n"})}),"\n",(0,s.jsxs)(r.admonition,{title:"\u5173\u4e8e\u4fdd\u5b58\u4f5c\u4e1a\u7684\u80cc\u540e\u884c\u4e3a",type:"tip",children:[(0,s.jsxs)(r.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u4fdd\u5b58\u4f5c\u4e1a\u9700\u8981\u4f20\u9012 ",(0,s.jsx)(r.code,{children:"SchedulerBuilder"})," \u5bf9\u8c61\uff0c\u8fd9\u4e2a\u5bf9\u8c61\u53ef\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"GetJob(jobId)"})," \u83b7\u53d6\uff0c\u5982\uff1a"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'var schedulerBuilder = _schedulerFactory.GetJob("jobId")?.GetBuilder();\n'})}),(0,s.jsxs)(r.p,{children:["\u6b64\u65f6\u5b83\u7684\u5185\u90e8 ",(0,s.jsx)(r.code,{children:"Behavior"})," \u5c5e\u6027\u88ab\u6807\u8bb0\u4e3a ",(0,s.jsx)(r.code,{children:"PersistenceBehavior.Updated"}),"\uff0c\u4e5f\u5c31\u662f\u66f4\u65b0\u72b6\u6001\uff0c\u90a3\u4e48\u5bf9\u4e8e\u8fd9\u4e2a\u6784\u5efa\u5668\u7684\u4efb\u4f55\u64cd\u4f5c\u90fd\u4f1a\u6807\u8bb0\u4e3a ",(0,s.jsx)(r.code,{children:"\u66f4\u65b0"})," \u64cd\u4f5c\u3002"]}),(0,s.jsxs)(r.p,{children:["\u5982\u679c\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:".Appended()"})," \u6216 ",(0,s.jsx)(r.code,{children:".Removed()"})," \u65b9\u6cd5\u6807\u8bb0\u4e4b\u540e\uff0c\u90a3\u4e48\u5b83\u7684\u64cd\u4f5c\u884c\u4e3a\u5c31\u53d1\u751f\u53d8\u5316\u4e86\u3002"]}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:["\u5982\u679c\u88ab\u6807\u8bb0\u4e3a ",(0,s.jsx)(r.code,{children:".Appended()"})]}),"\uff0c\u90a3\u4e48\u5b83\u5c06\u8fdb\u884c ",(0,s.jsx)(r.code,{children:"\u65b0\u589e"})," \u64cd\u4f5c\u3002\u5982\uff1a"]}),"\n"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"schedulerBuilder.Appended();\n"})}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:["\u5982\u679c\u88ab\u6807\u8bb0\u4e3a ",(0,s.jsx)(r.code,{children:".Removed()"})]}),"\uff0c\u90a3\u4e48\u5b83\u5c06\u8fdb\u884c ",(0,s.jsx)(r.code,{children:"\u5220\u9664"})," \u64cd\u4f5c\u3002\u5982\uff1a"]}),"\n"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"schedulerBuilder.Removed();\n"})}),(0,s.jsxs)(r.p,{children:["\u6bd4\u5982\u4ee5\u4e0b\u7684\u4ee3\u7801\u5b9e\u5219\u662f ",(0,s.jsx)(r.code,{children:"\u65b0\u589e"})," \u6216 ",(0,s.jsx)(r.code,{children:"\u5220\u9664"})," \u6216 ",(0,s.jsx)(r.code,{children:"\u66f4\u65b0"})," \u64cd\u4f5c\uff1a"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,4,8}",children:'// \u5b9e\u9645\u505a\u65b0\u589e\u64cd\u4f5c\r\nvar scheduleResult = _schedulerFactory.TrySaveJob(SchedulerBuilder.Create<MyJob>(), out var scheduler); // Create \u65b9\u6cd5\u9ed8\u8ba4\u6807\u8bb0\u4e3a Appended\r\n\r\n// \u5b9e\u9645\u505a\u5220\u9664\u64cd\u4f5c\r\nvar schedulerBuilder = _schedulerFactory.GetJob("jobId")?.GetBuilder();\r\nvar scheduleResult = _schedulerFactory.TrySaveJob(schedulerBuilder?.Removed(), out var scheduler); // \u6807\u8bb0\u4e3a Removed\r\n\r\n// \u5b9e\u9645\u505a\u66f4\u65b0\u64cd\u4f5c\r\nvar scheduleResult = _schedulerFactory.TrySaveJob(SchedulerBuilder.Create<MyJob>().Updated(), out var scheduler); // Create \u65b9\u6cd5\u9ed8\u8ba4\u6807\u8bb0\u4e3a Appended\uff0c\u4f46\u8c03\u7528 Updated() \u65b9\u6cd5\n'})}),(0,s.jsxs)(r.p,{children:["\u53e6\u5916\uff0c\u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Trigger"})," \u4e5f\u5177\u5907\u76f8\u540c\u7684\u884c\u4e3a\u3002"]})]}),"\n",(0,s.jsx)(r.h3,{id:"261105-\u6dfb\u52a0\u4f5c\u4e1a",children:"26.1.10.5 \u6dfb\u52a0\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.p,{children:"\u6846\u67b6\u63d0\u4f9b\u4e86\u975e\u5e38\u591a\u7684\u91cd\u8f7d\u65b9\u6cd5\u6dfb\u52a0\u4f5c\u4e1a\uff0c\u5982\uff1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,5,9,22,35,48,62}",children:'// SchedulerBuilder \u65b9\u5f0f\r\nvar scheduleResult = _schedulerFactory.TryAddJob(schedulerBuilder, out var scheduler);\r\n_schedulerFactory.AddJob(schedulerBuilder1, schedulerBuilder2, ...);\r\n\r\n// JobBuilder + TriggerBuilders \u65b9\u5f0f\r\nvar scheduleResult = _schedulerFactory.TryAddJob(jobBuilder, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.TryAddJob(jobBuilder, triggerBuilder1, triggerBuilder2, ...);\r\n\r\n// \u6cdb\u578b\u65b9\u5f0f\r\nvar scheduleResult = _schedulerFactory.TryAddJob<MyJob>(new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob<MyJob>(triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e\u4f5c\u4e1a Id\r\nvar scheduleResult = _schedulerFactory.TryAddJob<MyJob>("job1", new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob<MyJob>("job1", triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e\u4f5c\u4e1a Id + \u4e32\u884c/\u5e76\u884c\r\nvar scheduleResult = _schedulerFactory.TryAddJob<MyJob>("job1", true, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob<MyJob>("job1", true, triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e \u4e32\u884c/ \u5e76\u884c\r\nvar scheduleResult = _schedulerFactory.TryAddJob<MyJob>(true, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob<MyJob>(true, triggerBuilder1, triggerBuilder2, ...);\r\n\r\n// \u7c7b\u578b\u65b9\u5f0f\r\nvar scheduleResult = _schedulerFactory.TryAddJob(typeof(MyJob), new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob(typeof(MyJob), triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e\u4f5c\u4e1a Id\r\nvar scheduleResult = _schedulerFactory.TryAddJob(typeof(MyJob), "job1", new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob(typeof(MyJob), "job1", triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e\u4f5c\u4e1a Id + \u4e32\u884c/\u5e76\u884c\r\nvar scheduleResult = _schedulerFactory.TryAddJob(typeof(MyJob), "job1", true, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob(typeof(MyJob), "job1", true, triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e \u4e32\u884c/ \u5e76\u884c\r\nvar scheduleResult = _schedulerFactory.TryAddJob(typeof(MyJob), true, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob(typeof(MyJob), true, triggerBuilder1, triggerBuilder2, ...);\r\n\r\n// \u52a8\u6001\u4f5c\u4e1a\u59d4\u6258\u65b9\u5f0f\r\nvar scheduleResult = _schedulerFactory.TryAddJob((context, stoppingToken) => { }, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob((context, stoppingToken) => { }, triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e\u4f5c\u4e1a Id\r\nvar scheduleResult = _schedulerFactory.TryAddJob((context, stoppingToken) => { }, "job1", new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob((context, stoppingToken) => { }, "job1", triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e\u4f5c\u4e1a Id + \u4e32\u884c/\u5e76\u884c\r\nvar scheduleResult = _schedulerFactory.TryAddJob((context, stoppingToken) => { }, "job1", true, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob((context, stoppingToken) => { }, "job1", true, triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e \u4e32\u884c/ \u5e76\u884c\r\nvar scheduleResult = _schedulerFactory.TryAddJob((context, stoppingToken) => { }, true, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddJob((context, stoppingToken) => { }, true, triggerBuilder1, triggerBuilder2, ...);\r\n\r\n// HTTP \u4f5c\u4e1a\uff0cFurion 4.8.7.7+\r\n// \u6cdb\u578b\u65b9\u5f0f\r\nvar scheduleResult = _schedulerFactory.TryAddHttpJob<MyHttpJob>(request => {}, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddHttpJob<MyHttpJob>(request => {}, triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e\u4f5c\u4e1a Id\r\nvar scheduleResult = _schedulerFactory.TryAddHttpJob<MyHttpJob>(request => {}, "job1", new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddHttpJob<MyHttpJob>(request => {}, "job1", triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e\u4f5c\u4e1a Id + \u4e32\u884c/\u5e76\u884c\r\nvar scheduleResult = _schedulerFactory.TryAddHttpJob<MyHttpJob>(request => {}, "job1", true, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddHttpJob<MyHttpJob>(request => {}, "job1", true, triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e \u4e32\u884c/ \u5e76\u884c\r\nvar scheduleResult = _schedulerFactory.TryAddHttpJob<MyHttpJob>(request => {}, true, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddHttpJob<MyHttpJob>(true, triggerBuilder1, triggerBuilder2, ...);\r\n\r\n// \u9ed8\u8ba4\u65b9\u5f0f\r\nvar scheduleResult = _schedulerFactory.TryAddHttpJob(request => {}, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddHttpJob(request => {}, triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e\u4f5c\u4e1a Id\r\nvar scheduleResult = _schedulerFactory.TryAddHttpJob(request => {}, "job1", new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddHttpJob(request => {}, "job1", triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e\u4f5c\u4e1a Id + \u4e32\u884c/\u5e76\u884c\r\nvar scheduleResult = _schedulerFactory.TryAddHttpJob(request => {}, "job1", true, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddHttpJob(request => {}, "job1", true, triggerBuilder1, triggerBuilder2, ...);\r\n// \u652f\u6301\u914d\u7f6e \u4e32\u884c/ \u5e76\u884c\r\nvar scheduleResult = _schedulerFactory.TryAddHttpJob(request => {}, true, new[] { triggerBuilder1, triggerBuilder2, ...}, out var scheduler);\r\n_schedulerFactory.AddHttpJob(request => {}, true, triggerBuilder1, triggerBuilder2, ...);\n'})}),"\n",(0,s.jsx)(r.h3,{id:"261106-\u66f4\u65b0\u4f5c\u4e1a",children:"26.1.10.6 \u66f4\u65b0\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"// \u8fd4\u56de ScheduleResult \u65b9\u5f0f\r\nvar scheduleResult = _schedulerFactory.TryUpdateJob(schedulerBuilder, out var scheduler);\r\n\r\n// \u65e0\u8fd4\u56de\u503c\u65b9\u5f0f\r\n_schedulerFactory.UpdateJob(schedulerBuilder1, schedulerBuilder2, ...);\n"})}),"\n",(0,s.jsx)(r.h3,{id:"261107-\u5220\u9664\u4f5c\u4e1a",children:"26.1.10.7 \u5220\u9664\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u8fd4\u56de ScheduleResult \u65b9\u5f0f\r\nvar scheduleResult = _schedulerFactory.TryRemoveJob("job1", out var scheduler);\r\nvar scheduleResult = _schedulerFactory.TryRemoveJob(scheduler);\r\n\r\n// \u65e0\u8fd4\u56de\u503c\u65b9\u5f0f\r\n_schedulerFactory.RemoveJob("job1", "job2", ...);\r\n_schedulerFactory.RemoveJob(scheduler1, scheduler2, ...);\n'})}),"\n",(0,s.jsx)(r.h3,{id:"261108-\u68c0\u67e5\u4f5c\u4e1a\u662f\u5426\u5b58\u5728",children:"26.1.10.8 \u68c0\u67e5\u4f5c\u4e1a\u662f\u5426\u5b58\u5728"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,4}",children:'var isExist = _schedulerFactory.ContainsJob("job1");\r\n\r\n// \u8fd8\u53ef\u4ee5\u901a\u8fc7 group \u67e5\u627e\r\nvar isExist = _schedulerFactory.ContainsJob("job1", "group1");\n'})}),"\n",(0,s.jsx)(r.h3,{id:"261109-\u542f\u52a8\u6240\u6709\u4f5c\u4e1a",children:"26.1.10.9 \u542f\u52a8\u6240\u6709\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,4}",children:'_schedulerFactory.StartAll();\r\n\r\n// \u8fd8\u53ef\u4ee5\u901a\u8fc7 group \u542f\u52a8\r\n_schedulerFactory.StartAll("group1");\n'})}),"\n",(0,s.jsx)(r.h3,{id:"2611010-\u6682\u505c\u6240\u6709\u4f5c\u4e1a",children:"26.1.10.10 \u6682\u505c\u6240\u6709\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,4}",children:' _schedulerFactory.PauseAll();\r\n\r\n// \u8fd8\u53ef\u4ee5\u901a\u8fc7 group \u64cd\u4f5c\r\n _schedulerFactory.PauseAll("group1");\n'})}),"\n",(0,s.jsx)(r.h3,{id:"2611011-\u5220\u9664\u6240\u6709\u4f5c\u4e1a",children:"26.1.10.11 \u5220\u9664\u6240\u6709\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,4}",children:' _schedulerFactory.RemoveAll();\r\n\r\n// \u8fd8\u53ef\u4ee5\u901a\u8fc7 group \u64cd\u4f5c\r\n _schedulerFactory.RemoveAll("group1");\n'})}),"\n",(0,s.jsx)(r.h3,{id:"2611012-\u5f3a\u5236\u89e6\u53d1\u6240\u6709\u4f5c\u4e1a\u6301\u4e45\u5316\u64cd\u4f5c",children:"26.1.10.12 \u5f3a\u5236\u89e6\u53d1\u6240\u6709\u4f5c\u4e1a\u6301\u4e45\u5316\u64cd\u4f5c"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,4}",children:' _schedulerFactory.PersistAll();\r\n\r\n// \u8fd8\u53ef\u4ee5\u901a\u8fc7 group \u64cd\u4f5c\r\n _schedulerFactory.PersistAll("group1");\n'})}),"\n",(0,s.jsx)(r.h3,{id:"2611013-\u6821\u5bf9\u6240\u6709\u4f5c\u4e1a",children:"26.1.10.13 \u6821\u5bf9\u6240\u6709\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,4}",children:' _schedulerFactory.CollateAll();\r\n\r\n// \u8fd8\u53ef\u4ee5\u901a\u8fc7 group \u64cd\u4f5c\r\n _schedulerFactory.CollateAll("group1");\n'})}),"\n",(0,s.jsx)(r.h3,{id:"2611014-\u5f3a\u5236\u5524\u9192\u4f5c\u4e1a\u8c03\u5ea6\u5668",children:"26.1.10.14 \u5f3a\u5236\u5524\u9192\u4f5c\u4e1a\u8c03\u5ea6\u5668"}),"\n",(0,s.jsxs)(r.p,{children:["\u6b63\u5e38\u60c5\u51b5\u4e0b\uff0c\u4f5c\u4e1a\u8c03\u5ea6\u5668\u4f1a\u81ea\u52a8\u7ba1\u7406 ",(0,s.jsx)(r.code,{children:"CPU"})," \u4f11\u7720\u548c\u5524\u9192\uff0c\u4f46\u4e00\u4e9b\u7279\u6b8a\u60c5\u51b5\u4e0b\u9700\u8981\u5f3a\u5236\u5524\u9192\u4f5c\u4e1a\u8c03\u5ea6\u5668\uff08\u6bd4\u5982\u8c03\u5ea6\u5668\u5047\u6b7b\u4e86\uff0c\u88ab\u56de\u6536\u4e86...\uff09\uff0c\u53ef\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"_schedulerFactory.CancelSleep();\n"})}),"\n",(0,s.jsx)(r.h3,{id:"2611015-\u7acb\u5373\u6267\u884c\u4f5c\u4e1a",children:"26.1.10.15 \u7acb\u5373\u6267\u884c\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.7.11 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u5e26\u8fd4\u56de\u503c\r\nvar scheduleResult = _schedulerFactory.TryRunJob("job1");\r\n// \u4e0d\u5e26\u8fd4\u56de\u503c\r\n_schedulerFactory.RunJob("job1");\n'})}),"\n",(0,s.jsx)(r.admonition,{title:"\u6ce8\u610f\u4e8b\u9879",type:"important",children:(0,s.jsxs)(r.p,{children:["\u5982\u679c\u4f5c\u4e1a\u672c\u8eab\u5904\u4e8e ",(0,s.jsx)(r.code,{children:"(Pause)\u6682\u505c"}),"\u3001",(0,s.jsx)(r.code,{children:"(NotStart)\u521d\u59cb\u5316\u65f6\u672a\u542f\u52a8"}),"\u3001",(0,s.jsx)(r.code,{children:"(Unoccupied)\u65e0\u89e6\u53d1\u65f6\u95f4"})," \u72b6\u6001\uff0c\u90a3\u4e48\u70b9\u51fb ",(0,s.jsx)(r.strong,{children:"\u7acb\u5373\u6267\u884c"})," \u540e\u5c06\u81ea\u52a8\u8f6c\u81f3 ",(0,s.jsx)(r.code,{children:"\u5c31\u7eea"})," \u72b6\u6001\u3002"]})}),"\n",(0,s.jsxs)(r.h2,{id:"26111-\u4f5c\u4e1a\u8ba1\u5212-ischeduler",children:["26.1.11 \u4f5c\u4e1a\u8ba1\u5212 ",(0,s.jsx)(r.code,{children:"IScheduler"})]}),"\n",(0,s.jsxs)(r.p,{children:["\u4f5c\u4e1a\u8ba1\u5212 ",(0,s.jsx)(r.code,{children:"Scheduler"})," \u7684\u9ed8\u8ba4\u5b9e\u73b0\u63a5\u53e3\u662f ",(0,s.jsx)(r.code,{children:"IScheduler"}),"\uff0c\u8be5\u63a5\u53e3\u4e3b\u8981\u7528\u6765\u64cd\u4f5c\u5f53\u524d\uff08\u5355\u4e2a\uff09\u4f5c\u4e1a\u3002"]}),"\n",(0,s.jsxs)(r.h3,{id:"261111-\u83b7\u53d6-schedulermodel-\u5b9e\u4f8b",children:["26.1.11.1 \u83b7\u53d6 ",(0,s.jsx)(r.code,{children:"SchedulerModel"})," \u5b9e\u4f8b"]}),"\n",(0,s.jsxs)(r.p,{children:["\u83b7\u53d6 ",(0,s.jsx)(r.code,{children:"SchedulerModel"})," \u4e4b\u540e\u53ef\u76f4\u63a5\u8bbf\u95ee ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u548c ",(0,s.jsx)(r.code,{children:"Trigger"})," \u5bf9\u8c61\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var schedulerModel = scheduler.GetModel();\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"261112-\u83b7\u53d6-schedulerbuilder",children:["26.1.11.2 \u83b7\u53d6 ",(0,s.jsx)(r.code,{children:"SchedulerBuilder"})]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var schedulerBuilder = scheduler.GetBuilder();\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"261113-\u83b7\u53d6-jobbuilder",children:["26.1.11.3 \u83b7\u53d6 ",(0,s.jsx)(r.code,{children:"JobBuilder"})]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var jobBuilder = scheduler.GetJobBuilder();\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"261114-\u83b7\u53d6-triggerbuilder-\u96c6\u5408",children:["26.1.11.4 \u83b7\u53d6 ",(0,s.jsx)(r.code,{children:"TriggerBuilder"})," \u96c6\u5408"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var triggerBuilders = scheduler.GetTriggerBuilders();\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"261115-\u83b7\u53d6\u5355\u4e2a-triggerbuilder",children:["26.1.11.5 \u83b7\u53d6\u5355\u4e2a ",(0,s.jsx)(r.code,{children:"TriggerBuilder"})]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'var triggerBuilder = scheduler.GetTriggerBuilder("trigger1");\n'})}),"\n",(0,s.jsx)(r.h3,{id:"261116-\u83b7\u53d6\u4f5c\u4e1a\u4fe1\u606f",children:"26.1.11.6 \u83b7\u53d6\u4f5c\u4e1a\u4fe1\u606f"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var jobDetail = scheduler.GetJobDetail();\n"})}),"\n",(0,s.jsx)(r.h3,{id:"261117-\u83b7\u53d6\u4f5c\u4e1a\u89e6\u53d1\u5668\u96c6\u5408",children:"26.1.11.7 \u83b7\u53d6\u4f5c\u4e1a\u89e6\u53d1\u5668\u96c6\u5408"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var triggers = scheduler.GetTriggers();\n"})}),"\n",(0,s.jsx)(r.h3,{id:"261118-\u83b7\u53d6\u5355\u4e2a\u4f5c\u4e1a\u89e6\u53d1\u5668",children:"26.1.11.8 \u83b7\u53d6\u5355\u4e2a\u4f5c\u4e1a\u89e6\u53d1\u5668"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,6}",children:'// \u8fd4\u56de ScheduleResult \u65b9\u5f0f\r\nvar scheduleResult = scheduler.TryGetTrigger("trigger1", out var trigger); // \u5982\u679c\u5b58\u5728\u8fd4\u56de ScheduleResult.Succeed\r\nvar scheduleResult = scheduler.TryGetTrigger("not_found", out var trigger); // => ScheduleResult.NotFound\r\nvar scheduleResult = scheduler.TryGetTrigger("", out var trigger); // => ScheduleResult.NotIdentify\r\n\r\n// \u8fd4\u56de Trigger \u65b9\u5f0f\r\nvar trigger = scheduler.GetTrigger("trigger1"); // \u5982\u679c\u5b58\u5728\u8fd4\u56de Trigger\r\nvar trigger = scheduler.GetTrigger("not_found"); // => null\r\nvar trigger = scheduler.GetTrigger(""); // => null\n'})}),"\n",(0,s.jsx)(r.h3,{id:"261119-\u4fdd\u5b58\u4f5c\u4e1a\u89e6\u53d1\u5668",children:"26.1.11.9 \u4fdd\u5b58\u4f5c\u4e1a\u89e6\u53d1\u5668"}),"\n",(0,s.jsxs)(r.p,{children:["\u4fdd\u5b58\u4f5c\u4e1a\u89e6\u53d1\u5668\u662f\u6846\u67b6\u63d0\u4f9b\u5f3a\u5927\u4e14\u7b80\u5355\u7684\u65b9\u6cd5\uff0c\u652f\u6301 ",(0,s.jsx)(r.code,{children:"\u65b0\u589e"}),"\uff0c",(0,s.jsx)(r.code,{children:"\u7f16\u8f91"}),"\uff0c",(0,s.jsx)(r.code,{children:"\u5220\u9664"})," \u4f5c\u4e1a\u89e6\u53d1\u5668\uff0c\u4e5f\u5c31\u662f\u4e09\u5927\u64cd\u4f5c\u90fd\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u6b64\u65b9\u6cd5\u76f4\u63a5\u64cd\u4f5c\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = scheduler.TrySaveTrigger(triggerBuilder, out var trigger);\r\n\r\n// \u65e0\u8fd4\u56de\u503c\uff0c\u652f\u6301\u591a\u4e2a\r\nscheduler.SaveTrigger(triggerBuilder1, triggerBuilder2, ...)\n"})}),"\n",(0,s.jsxs)(r.admonition,{title:"\u5173\u4e8e\u4fdd\u5b58\u4f5c\u4e1a\u89e6\u53d1\u5668\u7684\u80cc\u540e\u884c\u4e3a",type:"tip",children:[(0,s.jsxs)(r.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u4fdd\u5b58\u4f5c\u4e1a\u89e6\u53d1\u5668\u9700\u8981\u4f20\u9012 ",(0,s.jsx)(r.code,{children:"TriggerBuilder"})," \u5bf9\u8c61\uff0c\u8fd9\u4e2a\u5bf9\u8c61\u53ef\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"GetTriggerBuilder(triggerId)"})," \u83b7\u53d6\uff0c\u5982\uff1a"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'var triggerBuilder = scheduler.GetTriggerBuilder("trigger1");\n'})}),(0,s.jsxs)(r.p,{children:["\u6b64\u65f6\u5b83\u7684\u5185\u90e8 ",(0,s.jsx)(r.code,{children:"Behavior"})," \u5c5e\u6027\u88ab\u6807\u8bb0\u4e3a ",(0,s.jsx)(r.code,{children:"PersistenceBehavior.Updated"}),"\uff0c\u4e5f\u5c31\u662f\u66f4\u65b0\u72b6\u6001\uff0c\u90a3\u4e48\u5bf9\u4e8e\u8fd9\u4e2a\u6784\u5efa\u5668\u7684\u4efb\u4f55\u64cd\u4f5c\u90fd\u4f1a\u6807\u8bb0\u4e3a ",(0,s.jsx)(r.code,{children:"\u66f4\u65b0"})," \u64cd\u4f5c\u3002"]}),(0,s.jsxs)(r.p,{children:["\u5982\u679c\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:".Appended()"})," \u6216 ",(0,s.jsx)(r.code,{children:".Removed()"})," \u65b9\u6cd5\u6807\u8bb0\u4e4b\u540e\uff0c\u90a3\u4e48\u5b83\u7684\u64cd\u4f5c\u884c\u4e3a\u5c31\u53d1\u751f\u53d8\u5316\u4e86\u3002"]}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:["\u5982\u679c\u88ab\u6807\u8bb0\u4e3a ",(0,s.jsx)(r.code,{children:".Appended()"})]}),"\uff0c\u90a3\u4e48\u5b83\u5c06\u8fdb\u884c ",(0,s.jsx)(r.code,{children:"\u65b0\u589e"})," \u64cd\u4f5c\u3002\u5982\uff1a"]}),"\n"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"triggerBuilder.Appended();\n"})}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:["\u5982\u679c\u88ab\u6807\u8bb0\u4e3a ",(0,s.jsx)(r.code,{children:".Removed()"})]}),"\uff0c\u90a3\u4e48\u5b83\u5c06\u8fdb\u884c ",(0,s.jsx)(r.code,{children:"\u5220\u9664"})," \u64cd\u4f5c\u3002\u5982\uff1a"]}),"\n"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"triggerBuilder.Removed();\n"})}),(0,s.jsxs)(r.p,{children:["\u6bd4\u5982\u4ee5\u4e0b\u7684\u4ee3\u7801\u5b9e\u5219\u662f ",(0,s.jsx)(r.code,{children:"\u65b0\u589e"})," \u6216 ",(0,s.jsx)(r.code,{children:"\u5220\u9664"})," \u6216 ",(0,s.jsx)(r.code,{children:"\u66f4\u65b0"})," \u64cd\u4f5c\uff1a"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,4,8}",children:'// \u5b9e\u9645\u505a\u65b0\u589e\u64cd\u4f5c\r\nvar scheduleResult = scheduler.TrySaveTrigger(Triggers.PeriodSeconds(5), out var trigger); // Create \u65b9\u6cd5\u9ed8\u8ba4\u6807\u8bb0\u4e3a Appended\r\n\r\n// \u5b9e\u9645\u505a\u5220\u9664\u64cd\u4f5c\r\nvar triggerBuilder = scheduler.GetTriggerBuilder("trigger1");\r\nvar scheduleResult = scheduler.TrySaveTrigger(triggerBuilder?.Removed(), out var trigger); // \u6807\u8bb0\u4e3a Removed\r\n\r\n// \u5b9e\u9645\u505a\u66f4\u65b0\u64cd\u4f5c\r\nvar scheduleResult = scheduler.TrySaveTrigger(Trigggers.PeriodSeconds(5).Updated(), out var trigger); // Create \u65b9\u6cd5\u9ed8\u8ba4\u6807\u8bb0\u4e3a Appended\uff0c\u4f46\u8c03\u7528 Updated() \u65b9\u6cd5\n'})})]}),"\n",(0,s.jsx)(r.h3,{id:"2611110-\u66f4\u65b0\u4f5c\u4e1a\u4fe1\u606f",children:"26.1.11.10 \u66f4\u65b0\u4f5c\u4e1a\u4fe1\u606f"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,5,9,16}",children:'// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = scheduler.TryUpdateDetail(jobBuilder, out var jobDetail);\r\n\r\n// \u65e0\u8fd4\u56de\u503c\r\nscheduler.UpdateDetail(jobBuilder);\r\n\r\n// Furion 4.8.6+ \u652f\u6301\r\n// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = Scheduler.TryUpdateDetail(jobBuilder =>\r\n{\r\n jobBuilder.SetDescription("~~~");\r\n}, out var jobDetail);\r\n\r\n// Furion 4.8.6+ \u652f\u6301\r\n// \u65e0\u8fd4\u56de\u503c\r\nscheduler.UpdateDetail(jobBuilder =>\r\n{\r\n jobBuilder.SetDescription("~~~");\r\n});\n'})}),"\n",(0,s.jsx)(r.h3,{id:"2611111-\u6dfb\u52a0\u4f5c\u4e1a\u89e6\u53d1\u5668",children:"26.1.11.11 \u6dfb\u52a0\u4f5c\u4e1a\u89e6\u53d1\u5668"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = scheduler.TryAddTrigger(triggerBuilder, out var trigger);\r\n\r\n// \u65e0\u8fd4\u56de\u503c\uff0c\u652f\u6301\u591a\u4e2a\r\nscheduler.AddTrigger(triggerBuilder1, triggerBuilder2, ...);\n"})}),"\n",(0,s.jsx)(r.h3,{id:"2611112-\u66f4\u65b0\u4f5c\u4e1a\u89e6\u53d1\u5668",children:"26.1.11.12 \u66f4\u65b0\u4f5c\u4e1a\u89e6\u53d1\u5668"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,5,9,16}",children:'// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = scheduler.TryUpdateTrigger(triggerBuilder, out var trigger);\r\n\r\n// \u65e0\u8fd4\u56de\u503c\uff0c\u652f\u6301\u591a\u4e2a\r\nscheduler.UpdateTrigger(triggerBuilder1, triggerBuilder2, ...);\r\n\r\n// Furion 4.8.6+ \u652f\u6301\r\n// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = scheduler.TryUpdateTrigger("triggerId", triggerBuilder =>\r\n{\r\n triggerBuilder.SetDescription("~~");\r\n}, out var trigger);\r\n\r\n// Furion 4.8.6+ \u652f\u6301\r\n// \u65e0\u8fd4\u56de\u503c\r\nscheduler.UpdateTrigger("triggerId", triggerBuilder =>\r\n{\r\n triggerBuilder.SetDescription("~~");\r\n});\n'})}),"\n",(0,s.jsx)(r.h3,{id:"2611113-\u5220\u9664\u4f5c\u4e1a\u89e6\u53d1\u5668",children:"26.1.11.13 \u5220\u9664\u4f5c\u4e1a\u89e6\u53d1\u5668"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = scheduler.TryRemoveTrigger("trigger1", out var trigger);\r\n\r\n// \u65e0\u8fd4\u56de\u503c\uff0c\u652f\u6301\u591a\u4e2a\r\nscheduler.RemoveTrigger("trigger1", "trigger2", ...);\n'})}),"\n",(0,s.jsx)(r.h3,{id:"2611114-\u5220\u9664\u5f53\u524d\u4f5c\u4e1a",children:"26.1.11.14 \u5220\u9664\u5f53\u524d\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"// \u8fd4\u56de ScheduleResult \u7c7b\u578b\r\nvar scheduleResult = scheduler.TryRemove();\r\n\r\n// \u65e0\u8fd4\u56de\u503c\r\nscheduler.Remove();\n"})}),"\n",(0,s.jsx)(r.h3,{id:"2611115-\u5224\u65ad\u4f5c\u4e1a\u89e6\u53d1\u5668\u662f\u5426\u5b58\u5728",children:"26.1.11.15 \u5224\u65ad\u4f5c\u4e1a\u89e6\u53d1\u5668\u662f\u5426\u5b58\u5728"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'bool isExist = scheduler.ContainsTrigger("trigger1");\n'})}),"\n",(0,s.jsx)(r.h3,{id:"2611116-\u542f\u52a8\u4f5c\u4e1a\u89e6\u53d1\u5668",children:"26.1.11.16 \u542f\u52a8\u4f5c\u4e1a\u89e6\u53d1\u5668"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'bool succeed = scheduler.StartTrigger("trigger1");\n'})}),"\n",(0,s.jsx)(r.h3,{id:"2611117-\u6682\u505c\u4f5c\u4e1a\u89e6\u53d1\u5668",children:"26.1.11.17 \u6682\u505c\u4f5c\u4e1a\u89e6\u53d1\u5668"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:'bool succeed = scheduler.PauseTrigger("trigger1");\n'})}),"\n",(0,s.jsx)(r.h3,{id:"2611118-\u5f3a\u5236\u89e6\u53d1\u4f5c\u4e1a\u6301\u4e45\u5316\u64cd\u4f5c",children:"26.1.11.18 \u5f3a\u5236\u89e6\u53d1\u4f5c\u4e1a\u6301\u4e45\u5316\u64cd\u4f5c"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"scheduler.Persist();\n"})}),"\n",(0,s.jsx)(r.h3,{id:"2611119-\u542f\u52a8\u5f53\u524d\u4f5c\u4e1a",children:"26.1.11.19 \u542f\u52a8\u5f53\u524d\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"scheduler.Start();\n"})}),"\n",(0,s.jsx)(r.h3,{id:"2611120-\u6682\u505c\u5f53\u524d\u4f5c\u4e1a",children:"26.1.11.20 \u6682\u505c\u5f53\u524d\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"scheduler.Pause();\n"})}),"\n",(0,s.jsx)(r.h3,{id:"2611121-\u6821\u5bf9\u5f53\u524d\u4f5c\u4e1a",children:"26.1.11.21 \u6821\u5bf9\u5f53\u524d\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"scheduler.Collate();\n"})}),"\n",(0,s.jsx)(r.h3,{id:"2611122-\u5f3a\u5236\u5237\u65b0\u5f53\u524d\u4f5c\u4e1a",children:"26.1.11.22 \u5f3a\u5236\u5237\u65b0\u5f53\u524d\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.3.3 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u901a\u5e38\u60c5\u51b5\u4e0b\u6211\u4eec\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:'_schedulerFactory.GetJob("jobId")'})," \u83b7\u53d6\u5230\u4f5c\u4e1a\u4e4b\u540e\uff0c\u7136\u540e\u5bf9\u8fd9\u4e2a\u4f5c\u4e1a\u8fdb\u884c\u64cd\u4f5c\uff0c",(0,s.jsxs)(r.strong,{children:["\u4f46\u64cd\u4f5c\u4e4b\u540e\u8fd9\u4e2a\u5bf9\u8c61\u5e76\u4e0d\u80fd\u540c\u6b65\u66f4\u6539\uff0c\u9700\u8981\u53cd\u590d\u8c03\u7528 ",(0,s.jsx)(r.code,{children:"GetJob"})," \u65b9\u6cd5\u3002"]}),"\u3002"]}),"\n",(0,s.jsxs)(r.p,{children:["\u6240\u4ee5\u5728 ",(0,s.jsx)(r.code,{children:"Furion 4.8.3.3+"})," \u7248\u672c\u4e4b\u540e\uff0c",(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"IScheduler"})," \u4efb\u4f55\u64cd\u4f5c\u90fd\u5c06\u81ea\u52a8\u8c03\u7528 ",(0,s.jsx)(r.code,{children:"Reload()"})," \u65b9\u6cd5\u5237\u65b0\u53d8\u91cf"]}),"\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"// \u4e5f\u53ef\u4ee5\u81ea\u5df1\u624b\u52a8\u5f3a\u5236\u5237\u65b0\uff08\u901a\u5e38\u4e0d\u9700\u8981\u8c03\u7528\u4e0b\u9762\u4ee3\u7801~~\uff09\r\nscheduler.Reload();\n"})}),"\n",(0,s.jsxs)(r.h3,{id:"2611123-\u8f6c\u6362\u6210-json-\u683c\u5f0f",children:["26.1.11.23 \u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"JSON"})," \u683c\u5f0f"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"var json = scheduler.ConvertToJSON();\r\nvar json = scheduler.ConvertToJSON(NamingConventions.CamelCase);\n"})}),"\n",(0,s.jsx)(r.h3,{id:"2611124-\u8f6c\u6362\u6210\u53ef\u679a\u4e3e\u5b57\u5178",children:"26.1.11.24 \u8f6c\u6362\u6210\u53ef\u679a\u4e3e\u5b57\u5178"}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.4 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u901a\u5e38\u6211\u4eec\u5728\u5f00\u53d1\u5e94\u7528\u65f6\uff0c\u9700\u8981\u5c06\u4f5c\u4e1a\u8ba1\u5212\u4fe1\u606f\u8fdb\u884c\u62c6\u89e3\uff0c\u6bd4\u5982\u4e00\u4e2a\u4f5c\u4e1a\u8ba1\u5212\u5305\u542b\u4e24\u4e2a\u4f5c\u4e1a\u89e6\u53d1\u5668\uff0c\u90a3\u4e48\u53ef\u4ee5\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"scheduler.GetEnumerable()"})," \u65b9\u6cd5\u751f\u6210\u53ef\u679a\u4e3e\u5b57\u5178\u5bf9\u8c61\uff0c\u5b57\u5178\u4e2d\u7684\u9879\u6570\u91cf\u7b49\u4e8e\u4f5c\u4e1a\u89e6\u53d1\u5668\u6570\u91cf\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1}",children:"foreach (var (jobDetail, trigger) in scheduler.GetEnumerable())\r\n{\r\n // ....\r\n}\n"})}),"\n",(0,s.jsx)(r.h3,{id:"2611125-\u7acb\u5373\u6267\u884c\u4f5c\u4e1a",children:"26.1.11.25 \u7acb\u5373\u6267\u884c\u4f5c\u4e1a"}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.7.11 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers",children:"scheduler.Run();\n"})}),"\n",(0,s.jsx)(r.admonition,{title:"\u6ce8\u610f\u4e8b\u9879",type:"important",children:(0,s.jsxs)(r.p,{children:["\u5982\u679c\u4f5c\u4e1a\u672c\u8eab\u5904\u4e8e ",(0,s.jsx)(r.code,{children:"(Pause)\u6682\u505c"}),"\u3001",(0,s.jsx)(r.code,{children:"(NotStart)\u521d\u59cb\u5316\u65f6\u672a\u542f\u52a8"}),"\u3001",(0,s.jsx)(r.code,{children:"(Unoccupied)\u65e0\u89e6\u53d1\u65f6\u95f4"})," \u72b6\u6001\uff0c\u90a3\u4e48\u70b9\u51fb ",(0,s.jsx)(r.strong,{children:"\u7acb\u5373\u6267\u884c"})," \u540e\u5c06\u81ea\u52a8\u8f6c\u81f3 ",(0,s.jsx)(r.code,{children:"\u5c31\u7eea"})," \u72b6\u6001\u3002"]})}),"\n",(0,s.jsxs)(r.h2,{id:"26112-\u4f5c\u4e1a\u6301\u4e45\u5316\u5668-ijobpersistence",children:["26.1.12 \u4f5c\u4e1a\u6301\u4e45\u5316\u5668 ",(0,s.jsx)(r.code,{children:"IJobPersistence"})]}),"\n",(0,s.jsx)(r.h3,{id:"261121-\u5173\u4e8e\u4f5c\u4e1a\u6301\u4e45\u5316\u5668",children:"26.1.12.1 \u5173\u4e8e\u4f5c\u4e1a\u6301\u4e45\u5316\u5668"}),"\n",(0,s.jsx)(r.p,{children:"\u4f5c\u4e1a\u6301\u4e45\u5316\u5668\u6307\u7684\u662f\u53ef\u4ee5\u901a\u8fc7\u5b58\u50a8\u4ecb\u8d28\u5982\u6570\u636e\u5e93\u4e2d\u52a0\u8f7d\u4f5c\u4e1a\u4fe1\u606f\u5230\u5185\u5b58\u4e2d\uff0c\u53c8\u53ef\u4ee5\u5c06\u5185\u5b58\u4e2d\u4f5c\u4e1a\u8c03\u5ea6\u5668\u7684\u4f5c\u4e1a\u4fe1\u606f\u5b9e\u65f6\u540c\u6b65\u56de\u5b58\u50a8\u4ecb\u8d28\u4e2d\u3002"}),"\n",(0,s.jsx)(r.h3,{id:"261122-\u5b9e\u73b0\u4f5c\u4e1a\u6301\u4e45\u5316\u5668",children:"26.1.12.2 \u5b9e\u73b0\u4f5c\u4e1a\u6301\u4e45\u5316\u5668"}),"\n",(0,s.jsxs)(r.p,{children:["\u8c03\u5ea6\u4f5c\u4e1a\u670d\u52a1\u63d0\u4f9b\u4e86\u975e\u5e38\u7b80\u5355\u7684 ",(0,s.jsx)(r.code,{children:"IJobPersistence"})," \u63a5\u53e3\uff0c\u53ea\u9700\u5b9e\u73b0\u8be5\u63a5\u53e3\u5373\u53ef\u5b9e\u73b0\u6301\u4e45\u5316\uff0c\u5982\u5b9e\u73b0\u6570\u636e\u5e93\u6301\u4e45\u5316\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3,9,18,24}",children:'public class DbJobPersistence : IJobPersistence\r\n{\r\n public IEnumerable<SchedulerBuilder> Preload()\r\n {\r\n // \u4f5c\u4e1a\u8c03\u5ea6\u670d\u52a1\u542f\u52a8\u65f6\u8fd0\u884c\u65f6\u521d\u59cb\u5316\uff0c\u53ef\u901a\u8fc7\u6570\u636e\u5e93\u52a0\u8f7d\uff0c\u6216\u8005\u5176\u4ed6\u65b9\u5f0f\r\n return Array.Empty<SchedulerBuilder>();\r\n }\r\n\r\n public SchedulerBuilder OnLoading(SchedulerBuilder builder)\r\n {\r\n // \u5982\u679c\u662f\u66f4\u65b0\u64cd\u4f5c\uff0c\u5219 return builder.Updated(); \u5c06\u751f\u6210 UPDATE \u8bed\u53e5\r\n // \u5982\u679c\u662f\u65b0\u589e\u64cd\u4f5c\uff0c\u5219 return builder.Appended(); \u5c06\u751f\u6210 INSERT \u8bed\u53e5\r\n // \u5982\u679c\u662f\u5220\u9664\u64cd\u4f5c\uff0c\u5219 return builder.Removed(); \u5c06\u751f\u6210 DELETE \u8bed\u53e5\r\n // \u5982\u679c\u65e0\u9700\u6807\u8bb0\u64cd\u4f5c\uff0c\u8fd4\u56de builder \u9ed8\u8ba4\u503c\u5373\u53ef\r\n return builder;\r\n }\r\n\r\n public void OnChanged(PersistenceContext context)\r\n {\r\n var sql = context.ConvertToSQL("job_detail");\r\n // \u8fd9\u91cc\u6267\u884c sql \u5373\u53ef \ud83d\udc96\r\n }\r\n\r\n public void OnTriggerChanged(PersistenceTriggerContext context)\r\n {\r\n var sql = context.ConvertToSQL("job_trigger");\r\n // \u8fd9\u91cc\u6267\u884c sql \u5373\u53ef \ud83d\udc96\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.p,{children:["\u4e4b\u540e\u5728 ",(0,s.jsx)(r.code,{children:"Startup.cs"})," \u4e2d\u6ce8\u518c\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:"services.AddSchedule(options =>\r\n{\r\n options.AddPersistence<DbJobPersistence>();\r\n});\n"})}),"\n",(0,s.jsx)(r.p,{children:"\u53ef\u80fd\u6709\u4e9b\u5f00\u53d1\u8005\u770b\u5230\u8fd9\u91cc\u4e00\u8138\u4e0d\u89e3\uff0c\u6301\u4e45\u5316\u4e0d\u5e94\u8be5\u8fd9\u4e48\u7b80\u5355\u554a\uff01\u5176\u5b9e\u5c31\u662f\u8fd9\u4e48\u7b80\u5355...."}),"\n",(0,s.jsxs)(r.h3,{id:"261123-ijobpersistence-\u8be6\u7ec6\u8bf4\u660e",children:["26.1.12.3 ",(0,s.jsx)(r.code,{children:"IJobPersistence"})," \u8be6\u7ec6\u8bf4\u660e"]}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"IJobPersistence"})," \u63a5\u53e3\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u56db\u4e2a\u65b9\u6cd5\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"Preload"}),"\uff1a\u4f5c\u4e1a\u8c03\u5ea6\u670d\u52a1\u542f\u52a8\u65f6\u8c03\u7528\uff0c\u53ef\u5728\u8fd9\u91cc\u52a8\u6001\u521b\u5efa\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u5e76\u8fd4\u56de\u3002"]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3,5,9,13,16}",children:"public IEnumerable<SchedulerBuilder> Preload()\r\n{\r\n // \u53ef\u4ee5\u8fd9\u91cc\u67e5\u8be2\u6570\u636e\u5e93\u8fd4\u56de\r\n\r\n // \u8fd9\u91cc\u53ef\u4ee5\u626b\u63cf\u7a0b\u5e8f\u96c6\u52a8\u6001\u521b\u5efa\u8fd4\u56de\r\n return App.EffectiveTypes.Where(t => t.IsJobType())\r\n .Select(t => SchedulerBuilder.Create(JobBuilder.Create(t), t.ScanTriggers()));\r\n\r\n // \u5982\u679c\u7c7b\u578b\u8d34\u6709 [JobDetail] \u7279\u6027\uff0c\u8fd8\u53ef\u4ee5\u4e00\u952e\u626b\u63cf\u8fd4\u56de\r\n return App.EffectiveTypes.Where(t => t.IsJobType())\r\n .Select(t => t.ScanToBuilder());\r\n\r\n // \u8fd8\u53ef\u4ee5\u66f4\u7b80\u5355~~\r\n return App.EffectiveTypes.ScanToBuilders();\r\n\r\n // \u4e5f\u53ef\u4ee5\u624b\u52a8\u8fd4\u56de\r\n return new[]\r\n {\r\n SchedulerBuilder.Create(JobBuilder.Create<MyJob>(), Triggers.Minutely())\r\n }\r\n}\n"})}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsxs)(r.strong,{children:["\u67e5\u770b ",(0,s.jsx)(r.code,{children:"EFCore"})," \u548c ",(0,s.jsx)(r.code,{children:"SqlSugar"})," \u4f7f\u7528\u793a\u4f8b\uff1a"]})}),"\n",(0,s.jsxs)(d.Z,{defaultValue:"efcore",values:[{label:"EFCore",value:"efcore"},{label:"SqlSugar",value:"sqlsugar"}],children:[(0,s.jsx)(l.Z,{value:"efcore",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4,6,23-60,66}",children:"/// <summary>\r\n/// \u4f5c\u4e1a\u6301\u4e45\u5316\uff08\u6570\u636e\u5e93\uff09\r\n/// </summary>\r\npublic class DbJobPersistence : IJobPersistence, IDisposable\r\n{\r\n private readonly IServiceScope _serviceScope;\r\n private readonly IRepository<SysJobDetail> _jobRepository;\r\n private readonly IRepository<SysJobTrigger> _triggerRepository;\r\n\r\n public DbJobPersistence(IServiceScopeFactory scopeFactory)\r\n {\r\n _serviceScope = scopeFactory.CreateScope();\r\n var services = _serviceScope.ServiceProvider;\r\n\r\n _jobRepository = services.GetService<IRepository<SysJobDetail>>();\r\n _triggerRepository = services.GetService<IRepository<SysJobTrigger>>();\r\n }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u8c03\u5ea6\u670d\u52a1\u542f\u52a8\u65f6\r\n /// </summary>\r\n /// <returns></returns>\r\n public IEnumerable<SchedulerBuilder> Preload()\r\n {\r\n // \u83b7\u53d6\u6240\u6709\u5b9a\u4e49\u7684\u4f5c\u4e1a\r\n var allJobs = App.EffectiveTypes.ScanToBuilders();\r\n\r\n // \u82e5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\u4efb\u4f55\u4f5c\u4e1a\uff0c\u5219\u76f4\u63a5\u8fd4\u56de\r\n if (!_jobRepository.Any(u => true)) return allJobs;\r\n\r\n // \u904d\u5386\u6240\u6709\u5b9a\u4e49\u7684\u4f5c\u4e1a\r\n foreach (var schedulerBuilder in allJobs)\r\n {\r\n // \u83b7\u53d6\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668\r\n var jobBuilder = schedulerBuilder.GetJobBuilder();\r\n\r\n // \u52a0\u8f7d\u6570\u636e\u5e93\u6570\u636e\r\n var dbDetail = _jobRepository.FirstOfDefault(u => u.JobId == jobBuilder.JobId);\r\n if (dbDetail == null) continue;\r\n\r\n // \u540c\u6b65\u6570\u636e\u5e93\u6570\u636e\r\n jobBuilder.LoadFrom(dbDetail);\r\n\r\n // \u904d\u5386\u6240\u6709\u4f5c\u4e1a\u89e6\u53d1\u5668\r\n foreach (var (_, triggerBuilder) in schedulerBuilder.GetEnumerable())\r\n {\r\n // \u52a0\u8f7d\u6570\u636e\u5e93\u6570\u636e\r\n var dbTrigger = _triggerRepository.FirstOrDefault(u => u.JobId == jobBuilder.JobId && u.TriggerId == triggerBuilder.TriggerId);\r\n if (dbTrigger == null) continue;\r\n\r\n triggerBuilder.LoadFrom(dbTrigger)\r\n .Updated(); // \u6807\u8bb0\u66f4\u65b0\r\n }\r\n\r\n // \u6807\u8bb0\u66f4\u65b0\r\n schedulerBuilder.Updated();\r\n }\r\n\r\n return allJobs;\r\n }\r\n\r\n // ...\r\n\r\n public void Dispose()\r\n {\r\n _serviceScope?.Dispose();\r\n }\r\n}\n"})})}),(0,s.jsx)(l.Z,{value:"sqlsugar",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4,6,17-62}",children:"/// <summary>\r\n/// \u4f5c\u4e1a\u6301\u4e45\u5316\uff08\u6570\u636e\u5e93\uff09\r\n/// </summary>\r\npublic class DbJobPersistence : IJobPersistence\r\n{\r\n private readonly IServiceScopeFactory _scopeFactory;\r\n\r\n public DbJobPersistence(IServiceScopeFactory scopeFactory)\r\n {\r\n _scopeFactory = scopeFactory;\r\n }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u8c03\u5ea6\u670d\u52a1\u542f\u52a8\u65f6\r\n /// </summary>\r\n /// <returns></returns>\r\n public IEnumerable<SchedulerBuilder> Preload()\r\n {\r\n // \u521b\u5efa\u670d\u52a1\u4f5c\u7528\u57df\r\n using var serviceScope = scopeFactory.CreateScope();\r\n var services = serviceScope.ServiceProvider;\r\n\r\n // \u89e3\u6790\u4ed3\u50a8\r\n var jobRepository = services.GetService<Repository<SysJobDetails>>();\r\n var triggerRepository = services.GetService<Repository<SysJobTriggers>>();\r\n\r\n // \u83b7\u53d6\u6240\u6709\u5b9a\u4e49\u7684\u4f5c\u4e1a\r\n var allJobs = App.EffectiveTypes.ScanToBuilders();\r\n\r\n // \u82e5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\u4efb\u4f55\u4f5c\u4e1a\uff0c\u5219\u76f4\u63a5\u8fd4\u56de\r\n if (!jobRepository.IsAny(u => true)) return allJobs;\r\n\r\n // \u904d\u5386\u6240\u6709\u5b9a\u4e49\u7684\u4f5c\u4e1a\r\n foreach (var schedulerBuilder in allJobs)\r\n {\r\n // \u83b7\u53d6\u4f5c\u4e1a\u4fe1\u606f\u6784\u5efa\u5668\r\n var jobBuilder = schedulerBuilder.GetJobBuilder();\r\n\r\n // \u52a0\u8f7d\u6570\u636e\u5e93\u6570\u636e\r\n var dbDetail = jobRepository.GetFirst(u => u.JobId == jobBuilder.JobId);\r\n if (dbDetail == null) continue;\r\n\r\n // \u540c\u6b65\u6570\u636e\u5e93\u6570\u636e\r\n jobBuilder.LoadFrom(dbDetail);\r\n\r\n // \u904d\u5386\u6240\u6709\u4f5c\u4e1a\u89e6\u53d1\u5668\r\n foreach (var (_, triggerBuilder) in schedulerBuilder.GetEnumerable())\r\n {\r\n // \u52a0\u8f7d\u6570\u636e\u5e93\u6570\u636e\r\n var dbTrigger = triggerRepository.GetFirst(u => u.JobId == jobBuilder.JobId && u.TriggerId == triggerBuilder.TriggerId);\r\n if (dbTrigger == null) continue;\r\n\r\n triggerBuilder.LoadFrom(dbTrigger)\r\n .Updated(); // \u6807\u8bb0\u66f4\u65b0\r\n }\r\n\r\n // \u6807\u8bb0\u66f4\u65b0\r\n schedulerBuilder.Updated();\r\n }\r\n\r\n return allJobs;\r\n }\r\n\r\n // ...\r\n}\n"})})})]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"OnLoading"}),"\uff1a\u4f5c\u4e1a\u8ba1\u5212\u521d\u59cb\u5316\u901a\u77e5\uff0c\u901a\u5e38\u5728\u8fd9\u91cc\u8fdb\u4e00\u6b65\u4fee\u6539\u521d\u59cb\u5316\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u3002"]})}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["\u5728\u4f5c\u4e1a\u8c03\u5ea6\u5668\u670d\u52a1\u542f\u52a8\u65f6\u4f1a\u904d\u5386\u7a0b\u5e8f\u4e2d\u6240\u6709\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\uff0c\u7136\u540e\u9010\u6761\u8c03\u7528\u8be5\u65b9\u6cd5\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u8fd9\u91cc\u8fdb\u4e00\u6b65\u4fee\u6539\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u6570\u636e\uff0c\u4e4b\u540e",(0,s.jsxs)(r.strong,{children:["\u9009\u62e9\u6027\u8fd4\u56de ",(0,s.jsx)(r.code,{children:"SchedulerBuilder"})," \u7684\u6301\u4e45\u5316\u884c\u4e3a"]}),"\u3002"]}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"SchedulerBuilder"})," \u63d0\u4f9b ",(0,s.jsx)(r.code,{children:"Updated()"}),"\uff0c",(0,s.jsx)(r.code,{children:"Appended()"})," \u548c ",(0,s.jsx)(r.code,{children:"Removed()"})," \u6765\u4f5c\u4e3a\u6301\u4e45\u5316\u884c\u4e3a\u6807\u8bb0\u3002\u6b64\u6807\u8bb0\u5c06\u51b3\u5b9a\u6700\u7ec8\u751f\u6210\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u662f ",(0,s.jsx)(r.code,{children:"UPDATE"})," \u8fd8\u662f ",(0,s.jsx)(r.code,{children:"INSERT"})," \u8fd8\u662f ",(0,s.jsx)(r.code,{children:"UPDATE"}),"\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4,8,12-13,16}",children:'public SchedulerBuilder OnLoading(SchedulerBuilder builder)\r\n{\r\n // \u6bd4\u5982\u8fd9\u91cc\u4fee\u6539\u4f5c\u4e1a\u4fe1\u606f\u63cf\u8ff0\r\n builder.GetJobBuilder()\r\n .SetDescription("\u8fd9\u662f\u63cf\u8ff0~~");\r\n\r\n // \u8fd8\u53ef\u4ee5\u4fee\u6539\u89e6\u53d1\u5668\r\n builder.GetTriggerBuilder("trigger1")\r\n .SetDescription("\u8fd9\u662f\u89e6\u53d1\u5668\u63cf\u8ff0~~");\r\n\r\n // \u8fd8\u53ef\u4ee5\u901a\u8fc7\u6570\u636e\u5e93\u67e5\u8be2\u8fd4\u56de\u586b\u5145 \ud83d\ude0e\r\n builder.GetJobBuilder()\r\n .LoadFrom(dbJobDetail); // dbJobDetail \u8868\u793a\u6839\u636e jobId \u67e5\u8be2\u6570\u636e\u5e93\u8fd4\u56de\u7684\u5bf9\u8c61\r\n\r\n // \u8fd8\u53ef\u4ee5\u83b7\u53d6\u679a\u4e3e\u5bf9\u8c61\u9010\u6761\u66f4\u65b0\r\n foreach(var (jobBuilder, triggerBuilder) in builder.GetEnumerable())\r\n {\r\n jobBuilder.SetDescription("....");\r\n triggerBuilder.Updated(); // \u6807\u8bb0\u8be5\u89e6\u53d1\u5668\u5df2\u88ab\u66f4\u65b0\uff0c\u5e76\u751f\u6210 UPDATE \u8bed\u53e5\r\n triggerBuilder.Removed(); // \u6807\u8bb0\u8be5\u89e6\u53d1\u5668\u5df2\u88ab\u5220\u9664\uff0c\u5e76\u751f\u6210 DELETE \u8bed\u53e5\r\n }\r\n\r\n // \u6807\u8bb0\u4ece\u5176\u4ed6\u5730\u65b9\u66f4\u65b0\uff0c\u6bd4\u5982\u6570\u636e\u5e93\r\n return builder;\r\n}\n'})}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u679c\u5b58\u50a8\u4ecb\u8d28\uff08\u5982\u6570\u636e\u5e93\uff09\u5df2\u7ecf\u5220\u9664\u8be5\u4f5c\u4e1a\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u6807\u8bb0\u4e3a ",(0,s.jsx)(r.code,{children:"Removed()"}),"\uff0c\u8fd9\u6837\u8be5\u4f5c\u4e1a\u4f1a\u4ece\u5185\u5b58\u4e2d\u79fb\u9664\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3,6}",children:"public SchedulerBuilder OnLoading(SchedulerBuilder builder)\r\n{\r\n // \u6bd4\u5982\u8fd9\u91cc\u6839\u636e jobId \u67e5\u8be2\u6570\u636e\u5e93\u5df2\u7ecf\u786e\u8ba4\u6570\u636e\u4e0d\u5b58\u5728\u4e86\r\n\r\n // \u6807\u8bb0\u4ece\u5176\u4ed6\u5730\u65b9\u79fb\u9664\r\n return builder.Removed();\r\n}\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u679c\u5b58\u50a8\u4ecb\u8d28\uff08\u5982\u6570\u636e\u5e93\uff09\u65b0\u589e\u4e86\u65b0\u4f5c\u4e1a\u4f46\u5185\u5b58\u4e2d\u4e0d\u5b58\u5728\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u6807\u8bb0\u4e3a ",(0,s.jsx)(r.code,{children:"Append()"}),"\uff0c\u8fd9\u6837\u8be5\u4f5c\u4e1a\u4f1a\u6dfb\u52a0\u5230\u5185\u5b58\u4e2d\uff0c",(0,s.jsxs)(r.strong,{children:["\u4f46\u539f\u6709\u7684 ",(0,s.jsx)(r.code,{children:"builder"})," \u5c31\u4f1a\u88ab\u4e22\u5f03"]}),"\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4,6,8,11}",children:"public SchedulerBuilder OnLoading(SchedulerBuilder builder)\r\n{\r\n // \u6bd4\u5982\u5728\u8fd9\u91cc\u52a8\u6001\u521b\u5efa\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\r\n var newBuilder = SchedulerBuilder.Create<MyJob>(Triggers.Minutely());\r\n // \u8fd8\u53ef\u4ee5\u514b\u9686\u4e00\u4e2a\r\n var newBuilder = SchedulerBuilder.Clone(builder);\r\n // \u8fd8\u53ef\u4ee5\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6/JSON\r\n var newBuilder = SchedulerBuilder.From(json);\r\n\r\n // \u8fd4\u56de\u65b0\u7684\u4f5c\u4e1a\u8ba1\u5212\u6784\u5efa\u5668\u5e76\u6807\u8bb0\u4e3a\u65b0\u589e\r\n return newBuilder.Appended();\r\n}\n"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"OnChanged"}),"\uff1a\u4f5c\u4e1a\u8ba1\u5212 ",(0,s.jsx)(r.code,{children:"Scheduler"})," \u7684 ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u53d8\u5316\u65f6\u8c03\u7528\u3002"]})}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["\u53ea\u8981\u4f5c\u4e1a\u8ba1\u5212\u6709\u4efb\u4f55\u53d8\u5316\u90fd\u5c06\u89e6\u53d1\u8be5\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u6709\u4e00\u4e2a ",(0,s.jsx)(r.code,{children:"PersistenceContext"})," \u7c7b\u578b\u7684\u53c2\u6570 ",(0,s.jsx)(r.code,{children:"context"}),"\uff0c",(0,s.jsx)(r.code,{children:"PersistenceContext"})," \u5305\u542b\u4ee5\u4e0b\u6210\u5458\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"PersistenceContext"})," \u5c5e\u6027\u5217\u8868"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"JobId"}),"\uff1a\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"Id"}),"\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"JobDetail"}),"\uff1a\u4f5c\u4e1a\u4fe1\u606f\uff0c",(0,s.jsx)(r.code,{children:"JobDetail"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Behavior"}),"\uff1a\u6301\u4e45\u5316\u884c\u4e3a\uff0c",(0,s.jsx)(r.code,{children:"PersistenceBehavior"})," \u679a\u4e3e\u7c7b\u578b\uff0c\u5305\u542b ",(0,s.jsx)(r.code,{children:"Appended"}),"\uff0c",(0,s.jsx)(r.code,{children:"Updated"})," \u548c ",(0,s.jsx)(r.code,{children:"Removed"})," \u4e09\u4e2a\u679a\u4e3e\u6210\u5458"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"PersistenceContext"})," \u65b9\u6cd5\u5217\u8868"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ConvertToSQL"}),"\uff1a\u5c06 ",(0,s.jsx)(r.code,{children:"PersistenceContext"})," \u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"SQL"})," \u5b57\u7b26\u4e32\uff0c",(0,s.jsx)(r.code,{children:"Behavior"})," \u5c5e\u6027\u503c\u4e0d\u540c\uff0c\u751f\u6210\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u4e0d\u540c"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ConvertToJSON"}),"\uff1a\u5c06 ",(0,s.jsx)(r.code,{children:"PersistenceContext"})," \u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ConvertToMonitor"}),"\uff1a\u5c06 ",(0,s.jsx)(r.code,{children:"PersistenceContext"})," \u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"Monitor"})," \u5b57\u7b26\u4e32"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ToString"}),"\uff1a\u5c06 ",(0,s.jsx)(r.code,{children:"PersistenceContext"})," \u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"\u7b80\u8981"})," \u5b57\u7b26\u4e32"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"GetNaming"}),"\uff1a\u63d0\u4f9b\u5c06\u7279\u5b9a\u5b57\u7b26\u4e32\u8f93\u51fa\u4e0d\u540c\u7684\u547d\u540d\u89c4\u5219\u5b57\u7b26\u4e32"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4,6,8,10}",children:'public void OnChanged(PersistenceContext context)\r\n{\r\n // \u8f93\u51fa CamelCase\uff08\u9a7c\u5cf0\u547d\u540d\u6cd5\uff09SQL \u8bed\u53e5\uff0c\u9ed8\u8ba4\u503c\r\n var sql = context.ConvertToSQL("job_detail");\r\n // \u8f93\u51fa Pascal\uff08\u5e15\u65af\u5361\u547d\u540d\u6cd5\uff09 SQL \u8bed\u53e5\r\n var sql = context.ConvertToSQL("job_detail", NamingConventions.Pascal);\r\n // \u8f93\u51fa UnderScoreCase\uff08\u4e0b\u5212\u7ebf\u547d\u540d\u6cd5\uff09 SQL \u8bed\u53e5\r\n var sql = context.ConvertToSQL("job_detail", NamingConventions.UnderScoreCase);\r\n\r\n // \u4f60\u8981\u505a\u7684\u53ea\u662f\u6267\u884c SQL \u4e86\uff01\uff01\uff01 \ud83d\ude0e\r\n}\n'})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"OnTriggerChanged"}),"\uff1a\u4f5c\u4e1a\u8ba1\u5212 ",(0,s.jsx)(r.code,{children:"Scheduler"})," \u7684\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Trigger"})," \u53d8\u5316\u65f6\u8c03\u7528\u3002"]})}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["\u53ea\u8981\u4f5c\u4e1a\u8ba1\u5212",(0,s.jsx)(r.strong,{children:"\u89e6\u53d1\u5668"}),"\u6709\u4efb\u4f55\u53d8\u5316\u90fd\u5c06\u89e6\u53d1\u8be5\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u6709\u4e00\u4e2a ",(0,s.jsx)(r.code,{children:"PersistenceTriggerContext"})," \u7c7b\u578b\u7684\u53c2\u6570 ",(0,s.jsx)(r.code,{children:"context"}),"\uff0c",(0,s.jsx)(r.code,{children:"PersistenceTriggerContext"})," \u7ee7\u627f\u81ea ",(0,s.jsx)(r.code,{children:"PersistenceContext"}),"\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"PersistenceTriggerContext"})," \u5c5e\u6027\u5217\u8868"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"JobId"}),"\uff1a\u4f5c\u4e1a ",(0,s.jsx)(r.code,{children:"Id"}),"\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"JobDetail"}),"\uff1a\u4f5c\u4e1a\u4fe1\u606f\uff0c",(0,s.jsx)(r.code,{children:"JobDetail"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"TriggerId"}),"\uff1a\u4f5c\u4e1a\u89e6\u53d1\u5668 ",(0,s.jsx)(r.code,{children:"Id"}),"\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Trigger"}),"\uff1a\u4f5c\u4e1a\u89e6\u53d1\u5668\uff0c",(0,s.jsx)(r.code,{children:"Trigger"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Behavior"}),"\uff1a\u6301\u4e45\u5316\u884c\u4e3a\uff0c",(0,s.jsx)(r.code,{children:"PersistenceBehavior"})," \u679a\u4e3e\u7c7b\u578b\uff0c\u5305\u542b ",(0,s.jsx)(r.code,{children:"Appended"}),"\uff0c",(0,s.jsx)(r.code,{children:"Updated"})," \u548c ",(0,s.jsx)(r.code,{children:"Removed"})," \u4e09\u4e2a\u679a\u4e3e\u6210\u5458"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"PersistenceTriggerContext"})," \u65b9\u6cd5\u5217\u8868"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ConvertToSQL"}),"\uff1a\u5c06 ",(0,s.jsx)(r.code,{children:"PersistenceTriggerContext"})," \u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"SQL"})," \u5b57\u7b26\u4e32\uff0c",(0,s.jsx)(r.code,{children:"Behavior"})," \u5c5e\u6027\u503c\u4e0d\u540c\uff0c\u751f\u6210\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u4e0d\u540c"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ConvertToJSON"}),"\uff1a\u5c06 ",(0,s.jsx)(r.code,{children:"PersistenceTriggerContext"})," \u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32\uff0c\u53ea\u5305\u542b ",(0,s.jsx)(r.code,{children:"Trigger"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ConvertAllToJSON"}),"\uff1a\u5c06 ",(0,s.jsx)(r.code,{children:"PersistenceTriggerContext"})," \u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"JSON"})," \u5b57\u7b26\u4e32\uff0c\u5305\u542b ",(0,s.jsx)(r.code,{children:"JobDetail"})," \u548c ",(0,s.jsx)(r.code,{children:"Trigger"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ConvertToMonitor"}),"\uff1a\u5c06 ",(0,s.jsx)(r.code,{children:"PersistenceTriggerContext"})," \u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"Monitor"})," \u5b57\u7b26\u4e32"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"ToString"}),"\uff1a\u5c06 ",(0,s.jsx)(r.code,{children:"PersistenceTriggerContext"})," \u8f6c\u6362\u6210 ",(0,s.jsx)(r.code,{children:"\u7b80\u8981"})," \u5b57\u7b26\u4e32"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"GetNaming"}),"\uff1a\u63d0\u4f9b\u5c06\u7279\u5b9a\u5b57\u7b26\u4e32\u8f93\u51fa\u4e0d\u540c\u7684\u547d\u540d\u89c4\u5219\u5b57\u7b26\u4e32"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4,6,8,10}",children:'public void OnTriggerChanged(PersistenceTriggerContext context)\r\n{\r\n // \u8f93\u51fa CamelCase\uff08\u9a7c\u5cf0\u547d\u540d\u6cd5\uff09SQL \u8bed\u53e5\uff0c\u9ed8\u8ba4\u503c\r\n var sql = context.ConvertToSQL("job_trigger");\r\n // \u8f93\u51fa Pascal\uff08\u5e15\u65af\u5361\u547d\u540d\u6cd5\uff09 SQL \u8bed\u53e5\r\n var sql = context.ConvertToSQL("job_trigger", NamingConventions.Pascal);\r\n // \u8f93\u51fa UnderScoreCase\uff08\u4e0b\u5212\u7ebf\u547d\u540d\u6cd5\uff09 SQL \u8bed\u53e5\r\n var sql = context.ConvertToSQL("job_trigger", NamingConventions.UnderScoreCase);\r\n\r\n // \u4f60\u8981\u505a\u7684\u53ea\u662f\u6267\u884c SQL \u4e86\uff01\uff01\uff01 \ud83d\ude0e\r\n}\n'})}),"\n",(0,s.jsxs)(r.admonition,{title:"\u5c0f\u77e5\u8bc6",type:"tip",children:[(0,s.jsxs)(r.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u751f\u6210\u7684 ",(0,s.jsx)(r.code,{children:"SQL"})," \u5c5e\u4e8e\u6807\u51c6 ",(0,s.jsx)(r.code,{children:"SQL"})," \u8bed\u53e5\uff0c\u4f46\u672a\u5fc5\u9002\u5408\u6240\u6709\u6570\u636e\u5e93\u7c7b\u578b\uff0c\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u6307\u5b9a ",(0,s.jsx)(r.code,{children:"BuildSqlType"})," \u6765\u751f\u6210\u7279\u5b9a\u6570\u636e\u5e93\u7684\u8bed\u53e5\uff0c\u5982\uff1a"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {4}",children:"services.AddSchedule(options =>\r\n{\r\n // \u914d\u7f6e\u8f93\u51fa SQL \u7684\u6570\u636e\u5e93\u7c7b\u578b\uff0cFurion 4.8.2.3+\r\n options.BuildSqlType = SqlTypes.SqlServer;\r\n});\n"})})]}),"\n",(0,s.jsx)(r.h3,{id:"261124-\u5404\u7c7b\u6570\u636e\u5e93\u521b\u5efa\u4f5c\u4e1a\u6301\u4e45\u5316\u8868\u8bed\u53e5",children:"26.1.12.4 \u5404\u7c7b\u6570\u636e\u5e93\u521b\u5efa\u4f5c\u4e1a\u6301\u4e45\u5316\u8868\u8bed\u53e5"}),"\n",(0,s.jsxs)(d.Z,{defaultValue:"Sqlite",values:[{label:"Sqlite",value:"Sqlite"},{label:"SqlServer",value:"SqlServer"},{label:"MySQL",value:"MySQL"},{label:"PostgreSQL",value:"PostgreSQL"},{label:"Oracle",value:"Oracle"},{label:"Firebird",value:"Firebird"},{label:"EFCore",value:"EFCore"},{label:"SqlSugar",value:"SqlSugar"}],children:[(0,s.jsxs)(l.Z,{value:"Sqlite",children:[(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u53ef\u81ea\u884c\u8c03\u6574\u5217\u547d\u540d\u89c4\u5219\u3002"})}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sql",metastring:"showLineNumbers {1,14}",children:'CREATE TABLE "JobDetails" (\r\n "Id" INTEGER NOT NULL CONSTRAINT "PK_JobDetails" PRIMARY KEY AUTOINCREMENT,\r\n "JobId" TEXT NOT NULL,\r\n "GroupName" TEXT NULL,\r\n "JobType" TEXT NULL,\r\n "AssemblyName" TEXT NULL,\r\n "Description" TEXT NULL,\r\n "Concurrent" INTEGER NOT NULL,\r\n "IncludeAnnotations" INTEGER NOT NULL,\r\n "Properties" TEXT NULL,\r\n "UpdatedTime" TEXT NULL\r\n);\r\n\r\nCREATE TABLE "JobTriggers" (\r\n "Id" INTEGER NOT NULL CONSTRAINT "PK_JobTriggers" PRIMARY KEY AUTOINCREMENT,\r\n "TriggerId" TEXT NOT NULL,\r\n "JobId" TEXT NOT NULL,\r\n "TriggerType" TEXT NULL,\r\n "AssemblyName" TEXT NULL,\r\n "Args" TEXT NULL,\r\n "Description" TEXT NULL,\r\n "Status" INTEGER NOT NULL,\r\n "StartTime" TEXT NULL,\r\n "EndTime" TEXT NULL,\r\n "LastRunTime" TEXT NULL,\r\n "NextRunTime" TEXT NULL,\r\n "NumberOfRuns" INTEGER NOT NULL,\r\n "MaxNumberOfRuns" INTEGER NOT NULL,\r\n "NumberOfErrors" INTEGER NOT NULL,\r\n "MaxNumberOfErrors" INTEGER NOT NULL,\r\n "NumRetries" INTEGER NOT NULL,\r\n "RetryTimeout" INTEGER NOT NULL,\r\n "StartNow" INTEGER NOT NULL,\r\n "RunOnStart" INTEGER NOT NULL,\r\n "ResetOnlyOnce" INTEGER NOT NULL,\r\n "Result" TEXT NULL,\r\n "ElapsedTime" INTEGER NOT NULL,\r\n "UpdatedTime" TEXT NULL\r\n);\n'})})]}),(0,s.jsxs)(l.Z,{value:"SqlServer",children:[(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u53ef\u81ea\u884c\u8c03\u6574\u5217\u547d\u540d\u89c4\u5219\u3002"})}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sql",metastring:"showLineNumbers {1,16}",children:"CREATE TABLE [JobDetails] (\r\n [Id] int NOT NULL IDENTITY,\r\n [JobId] nvarchar(max) NOT NULL,\r\n [GroupName] nvarchar(max) NULL,\r\n [JobType] nvarchar(max) NULL,\r\n [AssemblyName] nvarchar(max) NULL,\r\n [Description] nvarchar(max) NULL,\r\n [Concurrent] bit NOT NULL,\r\n [IncludeAnnotations] bit NOT NULL,\r\n [Properties] nvarchar(max) NULL,\r\n [UpdatedTime] datetime2 NULL,\r\n CONSTRAINT [PK_JobDetails] PRIMARY KEY ([Id])\r\n);\r\nGO\r\n\r\nCREATE TABLE [JobTriggers] (\r\n [Id] int NOT NULL IDENTITY,\r\n [TriggerId] nvarchar(max) NOT NULL,\r\n [JobId] nvarchar(max) NOT NULL,\r\n [TriggerType] nvarchar(max) NULL,\r\n [AssemblyName] nvarchar(max) NULL,\r\n [Args] nvarchar(max) NULL,\r\n [Description] nvarchar(max) NULL,\r\n [Status] bigint NOT NULL,\r\n [StartTime] datetime2 NULL,\r\n [EndTime] datetime2 NULL,\r\n [LastRunTime] datetime2 NULL,\r\n [NextRunTime] datetime2 NULL,\r\n [NumberOfRuns] bigint NOT NULL,\r\n [MaxNumberOfRuns] bigint NOT NULL,\r\n [NumberOfErrors] bigint NOT NULL,\r\n [MaxNumberOfErrors] bigint NOT NULL,\r\n [NumRetries] int NOT NULL,\r\n [RetryTimeout] int NOT NULL,\r\n [StartNow] bit NOT NULL,\r\n [RunOnStart] bit NOT NULL,\r\n [ResetOnlyOnce] bit NOT NULL,\r\n [Result] nvarchar(max) NULL,\r\n [ElapsedTime] bigint NOT NULL,\r\n [UpdatedTime] datetime2 NULL,\r\n CONSTRAINT [PK_JobTriggers] PRIMARY KEY ([Id])\r\n);\n"})})]}),(0,s.jsxs)(l.Z,{value:"MySQL",children:[(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u53ef\u81ea\u884c\u8c03\u6574\u5217\u547d\u540d\u89c4\u5219\u3002"})}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sql",metastring:"showLineNumbers {3,17}",children:"ALTER DATABASE CHARACTER SET utf8mb4;\r\n\r\nCREATE TABLE `JobDetails` (\r\n `Id` int NOT NULL AUTO_INCREMENT,\r\n `JobId` longtext CHARACTER SET utf8mb4 NOT NULL,\r\n `GroupName` longtext CHARACTER SET utf8mb4 NULL,\r\n `JobType` longtext CHARACTER SET utf8mb4 NULL,\r\n `AssemblyName` longtext CHARACTER SET utf8mb4 NULL,\r\n `Description` longtext CHARACTER SET utf8mb4 NULL,\r\n `Concurrent` tinyint(1) NOT NULL,\r\n `IncludeAnnotations` tinyint(1) NOT NULL,\r\n `Properties` longtext CHARACTER SET utf8mb4 NULL,\r\n `UpdatedTime` datetime(6) NULL,\r\n CONSTRAINT `PK_JobDetails` PRIMARY KEY (`Id`)\r\n) CHARACTER SET=utf8mb4;\r\n\r\nCREATE TABLE `JobTriggers` (\r\n `Id` int NOT NULL AUTO_INCREMENT,\r\n `TriggerId` longtext CHARACTER SET utf8mb4 NOT NULL,\r\n `JobId` longtext CHARACTER SET utf8mb4 NOT NULL,\r\n `TriggerType` longtext CHARACTER SET utf8mb4 NULL,\r\n `AssemblyName` longtext CHARACTER SET utf8mb4 NULL,\r\n `Args` longtext CHARACTER SET utf8mb4 NULL,\r\n `Description` longtext CHARACTER SET utf8mb4 NULL,\r\n `Status` int unsigned NOT NULL,\r\n `StartTime` datetime(6) NULL,\r\n `EndTime` datetime(6) NULL,\r\n `LastRunTime` datetime(6) NULL,\r\n `NextRunTime` datetime(6) NULL,\r\n `NumberOfRuns` bigint NOT NULL,\r\n `MaxNumberOfRuns` bigint NOT NULL,\r\n `NumberOfErrors` bigint NOT NULL,\r\n `MaxNumberOfErrors` bigint NOT NULL,\r\n `NumRetries` int NOT NULL,\r\n `RetryTimeout` int NOT NULL,\r\n `StartNow` tinyint(1) NOT NULL,\r\n `RunOnStart` tinyint(1) NOT NULL,\r\n `ResetOnlyOnce` tinyint(1) NOT NULL,\r\n `Result` longtext CHARACTER SET utf8mb4 NULL,\r\n `ElapsedTime` bigint NOT NULL,\r\n `UpdatedTime` datetime(6) NULL,\r\n CONSTRAINT `PK_JobTriggers` PRIMARY KEY (`Id`)\r\n) CHARACTER SET=utf8mb4;\n"})})]}),(0,s.jsxs)(l.Z,{value:"PostgreSQL",children:[(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u53ef\u81ea\u884c\u8c03\u6574\u5217\u547d\u540d\u89c4\u5219\u3002"})}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sql",metastring:"showLineNumbers {1,15}",children:'CREATE TABLE "JobDetails" (\r\n "Id" integer GENERATED BY DEFAULT AS IDENTITY,\r\n "JobId" text NOT NULL,\r\n "GroupName" text NULL,\r\n "JobType" text NULL,\r\n "AssemblyName" text NULL,\r\n "Description" text NULL,\r\n "Concurrent" boolean NOT NULL,\r\n "IncludeAnnotations" boolean NOT NULL,\r\n "Properties" text NULL,\r\n "UpdatedTime" timestamp with time zone NULL,\r\n CONSTRAINT "PK_JobDetails" PRIMARY KEY ("Id")\r\n);\r\n\r\nCREATE TABLE "JobTriggers" (\r\n "Id" integer GENERATED BY DEFAULT AS IDENTITY,\r\n "TriggerId" text NOT NULL,\r\n "JobId" text NOT NULL,\r\n "TriggerType" text NULL,\r\n "AssemblyName" text NULL,\r\n "Args" text NULL,\r\n "Description" text NULL,\r\n "Status" bigint NOT NULL,\r\n "StartTime" timestamp with time zone NULL,\r\n "EndTime" timestamp with time zone NULL,\r\n "LastRunTime" timestamp with time zone NULL,\r\n "NextRunTime" timestamp with time zone NULL,\r\n "NumberOfRuns" bigint NOT NULL,\r\n "MaxNumberOfRuns" bigint NOT NULL,\r\n "NumberOfErrors" bigint NOT NULL,\r\n "MaxNumberOfErrors" bigint NOT NULL,\r\n "NumRetries" integer NOT NULL,\r\n "RetryTimeout" integer NOT NULL,\r\n "StartNow" boolean NOT NULL,\r\n "RunOnStart" boolean NOT NULL,\r\n "ResetOnlyOnce" boolean NOT NULL,\r\n "Result" text NULL,\r\n "ElapsedTime" bigint NOT NULL,\r\n "UpdatedTime" timestamp with time zone NULL,\r\n CONSTRAINT "PK_JobTriggers" PRIMARY KEY ("Id")\r\n);\n'})})]}),(0,s.jsxs)(l.Z,{value:"Oracle",children:[(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u53ef\u81ea\u884c\u8c03\u6574\u5217\u547d\u540d\u89c4\u5219\u3002"})}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sql",metastring:"showLineNumbers {1,15}",children:'CREATE TABLE "JobDetails" (\r\n "Id" NUMBER(10) GENERATED BY DEFAULT ON NULL AS IDENTITY NOT NULL,\r\n "JobId" NVARCHAR2(2000) NOT NULL,\r\n "GroupName" NVARCHAR2(2000),\r\n "JobType" NVARCHAR2(2000),\r\n "AssemblyName" NVARCHAR2(2000),\r\n "Description" NVARCHAR2(2000),\r\n "Concurrent" NUMBER(1) NOT NULL,\r\n "IncludeAnnotations" NUMBER(1) NOT NULL,\r\n "Properties" NVARCHAR2(2000),\r\n "UpdatedTime" TIMESTAMP(7),\r\n CONSTRAINT "PK_JobDetails" PRIMARY KEY ("Id")\r\n);\r\n\r\nCREATE TABLE "JobTriggers" (\r\n "Id" NUMBER(10) GENERATED BY DEFAULT ON NULL AS IDENTITY NOT NULL,\r\n "TriggerId" NVARCHAR2(2000) NOT NULL,\r\n "JobId" NVARCHAR2(2000) NOT NULL,\r\n "TriggerType" NVARCHAR2(2000),\r\n "AssemblyName" NVARCHAR2(2000),\r\n "Args" NVARCHAR2(2000),\r\n "Description" NVARCHAR2(2000),\r\n "Status" NUMBER(10) NOT NULL,\r\n "StartTime" TIMESTAMP(7),\r\n "EndTime" TIMESTAMP(7),\r\n "LastRunTime" TIMESTAMP(7),\r\n "NextRunTime" TIMESTAMP(7),\r\n "NumberOfRuns" NUMBER(19) NOT NULL,\r\n "MaxNumberOfRuns" NUMBER(19) NOT NULL,\r\n "NumberOfErrors" NUMBER(19) NOT NULL,\r\n "MaxNumberOfErrors" NUMBER(19) NOT NULL,\r\n "NumRetries" NUMBER(10) NOT NULL,\r\n "RetryTimeout" NUMBER(10) NOT NULL,\r\n "StartNow" NUMBER(1) NOT NULL,\r\n "RunOnStart" NUMBER(1) NOT NULL,\r\n "ResetOnlyOnce" NUMBER(1) NOT NULL,\r\n "Result" NVARCHAR2(2000),\r\n "ElapsedTime" NUMBER(19) NOT NULL,\r\n "UpdatedTime" TIMESTAMP(7),\r\n CONSTRAINT "PK_JobTriggers" PRIMARY KEY ("Id")\r\n);\n'})})]}),(0,s.jsxs)(l.Z,{value:"Firebird",children:[(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u53ef\u81ea\u884c\u8c03\u6574\u5217\u547d\u540d\u89c4\u5219\u3002"})}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sql",metastring:"showLineNumbers {1,15}",children:'CREATE TABLE "JobDetails" (\r\n "Id" INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL,\r\n "JobId" BLOB SUB_TYPE TEXT NOT NULL,\r\n "GroupName" BLOB SUB_TYPE TEXT,\r\n "JobType" BLOB SUB_TYPE TEXT,\r\n "AssemblyName" BLOB SUB_TYPE TEXT,\r\n "Description" BLOB SUB_TYPE TEXT,\r\n "Concurrent" BOOLEAN NOT NULL,\r\n "IncludeAnnotations" BOOLEAN NOT NULL,\r\n "Properties" BLOB SUB_TYPE TEXT,\r\n "UpdatedTime" TIMESTAMP,\r\n CONSTRAINT "PK_JobDetails" PRIMARY KEY ("Id")\r\n);\r\n\r\nCREATE TABLE "JobTriggers" (\r\n "Id" INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL,\r\n "TriggerId" BLOB SUB_TYPE TEXT NOT NULL,\r\n "JobId" BLOB SUB_TYPE TEXT NOT NULL,\r\n "TriggerType" BLOB SUB_TYPE TEXT,\r\n "AssemblyName" BLOB SUB_TYPE TEXT,\r\n "Args" BLOB SUB_TYPE TEXT,\r\n "Description" BLOB SUB_TYPE TEXT,\r\n "Status" BIGINT NOT NULL,\r\n "StartTime" TIMESTAMP,\r\n "EndTime" TIMESTAMP,\r\n "LastRunTime" TIMESTAMP,\r\n "NextRunTime" TIMESTAMP,\r\n "NumberOfRuns" BIGINT NOT NULL,\r\n "MaxNumberOfRuns" BIGINT NOT NULL,\r\n "NumberOfErrors" BIGINT NOT NULL,\r\n "MaxNumberOfErrors" BIGINT NOT NULL,\r\n "NumRetries" INTEGER NOT NULL,\r\n "RetryTimeout" INTEGER NOT NULL,\r\n "StartNow" BOOLEAN NOT NULL,\r\n "RunOnStart" BOOLEAN NOT NULL,\r\n "ResetOnlyOnce" BOOLEAN NOT NULL,\r\n "Result" BLOB SUB_TYPE TEXT,\r\n "ElapsedTime" BIGINT NOT NULL,\r\n "UpdatedTime" TIMESTAMP,\r\n CONSTRAINT "PK_JobTriggers" PRIMARY KEY ("Id")\r\n);\n'})})]}),(0,s.jsxs)(l.Z,{value:"EFCore",children:[(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u53ef\u81ea\u884c\u8c03\u6574\u5217\u547d\u540d\u89c4\u5219\u3002"})}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,56}",children:'public class JobDetail\r\n{\r\n [Key]\r\n [DatabaseGenerated(DatabaseGeneratedOption.Identity)]\r\n public int Id { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a Id\r\n /// </summary>\r\n public string JobId { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u7ec4\u540d\u79f0\r\n /// </summary>\r\n public string? GroupName { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u7c7b\u578b\r\n /// </summary>\r\n /// <remarks>\u5b58\u50a8\u7684\u662f\u7c7b\u578b\u7684 FullName</remarks>\r\n public string? JobType { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u7c7b\u578b\u6240\u5728\u7a0b\u5e8f\u96c6\r\n /// </summary>\r\n /// <remarks>\u5b58\u50a8\u7684\u662f\u7a0b\u5e8f\u96c6 Name</remarks>\r\n public string? AssemblyName { get; set; }\r\n\r\n /// <summary>\r\n /// \u63cf\u8ff0\u4fe1\u606f\r\n /// </summary>\r\n public string? Description { get; set; }\r\n\r\n /// <summary>\r\n /// \u662f\u5426\u91c7\u7528\u5e76\u884c\u6267\u884c\r\n /// </summary>\r\n /// <remarks>\u5982\u679c\u8bbe\u7f6e\u4e3a false\uff0c\u90a3\u4e48\u4f7f\u7528\u4e32\u884c\u6267\u884c</remarks>\r\n public bool Concurrent { get; set; } = true;\r\n\r\n /// <summary>\r\n /// \u662f\u5426\u626b\u63cf IJob \u5b9e\u73b0\u7c7b [Trigger] \u7279\u6027\u89e6\u53d1\u5668\r\n /// </summary>\r\n public bool IncludeAnnotations { get; set; } = false;\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u4fe1\u606f\u989d\u5916\u6570\u636e\r\n /// </summary>\r\n public string? Properties { get; set; } = "{}";\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u66f4\u65b0\u65f6\u95f4\r\n /// </summary>\r\n public DateTime? UpdatedTime { get; set; }\r\n}\r\n\r\npublic class JobTrigger\r\n{\r\n [Key]\r\n [DatabaseGenerated(DatabaseGeneratedOption.Identity)]\r\n public int Id { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u89e6\u53d1\u5668 Id\r\n /// </summary>\r\n public string TriggerId { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a Id\r\n /// </summary>\r\n public string JobId { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u89e6\u53d1\u5668\u7c7b\u578b\r\n /// </summary>\r\n /// <remarks>\u5b58\u50a8\u7684\u662f\u7c7b\u578b\u7684 FullName</remarks>\r\n public string? TriggerType { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u89e6\u53d1\u5668\u7c7b\u578b\u6240\u5728\u7a0b\u5e8f\u96c6\r\n /// </summary>\r\n /// <remarks>\u5b58\u50a8\u7684\u662f\u7a0b\u5e8f\u96c6 Name</remarks>\r\n public string? AssemblyName { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u89e6\u53d1\u5668\u53c2\u6570\r\n /// </summary>\r\n /// <remarks>\u8fd0\u884c\u65f6\u5c06\u53cd\u5e8f\u5217\u5316\u4e3a object[] \u7c7b\u578b\u5e76\u4f5c\u4e3a\u6784\u9020\u51fd\u6570\u53c2\u6570</remarks>\r\n public string? Args { get; set; }\r\n\r\n /// <summary>\r\n /// \u63cf\u8ff0\u4fe1\u606f\r\n /// </summary>\r\n public string? Description { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u89e6\u53d1\u5668\u72b6\u6001\r\n /// </summary>\r\n public TriggerStatus Status { get; set; } = TriggerStatus.Ready;\r\n\r\n /// <summary>\r\n /// \u8d77\u59cb\u65f6\u95f4\r\n /// </summary>\r\n public DateTime? StartTime { get; set; }\r\n\r\n /// <summary>\r\n /// \u7ed3\u675f\u65f6\u95f4\r\n /// </summary>\r\n public DateTime? EndTime { get; set; }\r\n\r\n /// <summary>\r\n /// \u6700\u8fd1\u8fd0\u884c\u65f6\u95f4\r\n /// </summary>\r\n public DateTime? LastRunTime { get; set; }\r\n\r\n /// <summary>\r\n /// \u4e0b\u4e00\u6b21\u8fd0\u884c\u65f6\u95f4\r\n /// </summary>\r\n public DateTime? NextRunTime { get; set; }\r\n\r\n /// <summary>\r\n /// \u89e6\u53d1\u6b21\u6570\r\n /// </summary>\r\n public long NumberOfRuns { get; set; }\r\n\r\n /// <summary>\r\n /// \u6700\u5927\u89e6\u53d1\u6b21\u6570\r\n /// </summary>\r\n /// <remarks>\r\n /// <para>0\uff1a\u4e0d\u9650\u5236</para>\r\n /// <para>n\uff1aN \u6b21</para>\r\n /// </remarks>\r\n public long MaxNumberOfRuns { get; set; }\r\n\r\n /// <summary>\r\n /// \u51fa\u9519\u6b21\u6570\r\n /// </summary>\r\n public long NumberOfErrors { get; set; }\r\n\r\n /// <summary>\r\n /// \u6700\u5927\u51fa\u9519\u6b21\u6570\r\n /// </summary>\r\n /// <remarks>\r\n /// <para>0\uff1a\u4e0d\u9650\u5236</para>\r\n /// <para>n\uff1aN \u6b21</para>\r\n /// </remarks>\r\n public long MaxNumberOfErrors { get; set; }\r\n\r\n /// <summary>\r\n /// \u91cd\u8bd5\u6b21\u6570\r\n /// </summary>\r\n public int NumRetries { get; set; } = 0;\r\n\r\n /// <summary>\r\n /// \u91cd\u8bd5\u95f4\u9694\u65f6\u95f4\r\n /// </summary>\r\n /// <remarks>\u9ed8\u8ba41000\u6beb\u79d2</remarks>\r\n public int RetryTimeout { get; set; } = 1000;\r\n\r\n /// <summary>\r\n /// \u662f\u5426\u7acb\u5373\u542f\u52a8\r\n /// </summary>\r\n public bool StartNow { get; set; } = true;\r\n\r\n /// <summary>\r\n /// \u662f\u5426\u542f\u52a8\u65f6\u6267\u884c\u4e00\u6b21\r\n /// </summary>\r\n public bool RunOnStart { get; set; } = false;\r\n\r\n /// <summary>\r\n /// \u662f\u5426\u5728\u542f\u52a8\u65f6\u91cd\u7f6e\u6700\u5927\u89e6\u53d1\u6b21\u6570\u7b49\u4e8e\u4e00\u6b21\u7684\u4f5c\u4e1a\r\n /// </summary>\r\n /// <remarks>\u89e3\u51b3\u56e0\u6301\u4e45\u5316\u6570\u636e\u5df2\u5b8c\u6210\u4e00\u6b21\u89e6\u53d1\u4f46\u542f\u52a8\u65f6\u4e0d\u518d\u6267\u884c\u7684\u95ee\u9898</remarks>\r\n public bool ResetOnlyOnce { get; set; } = true;\r\n\r\n /// <summary>\r\n /// \u672c\u6b21\u6267\u884c\u7ed3\u679c\r\n /// </summary>\r\n public string? Result { get; set; }\r\n\r\n /// <summary>\r\n /// \u672c\u6b21\u6267\u884c\u8017\u65f6\r\n /// </summary>\r\n public long ElapsedTime { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u89e6\u53d1\u5668\u66f4\u65b0\u65f6\u95f4\r\n /// </summary>\r\n public DateTime? UpdatedTime { get; set; }\r\n}\n'})})]}),(0,s.jsxs)(l.Z,{value:"SqlSugar",children:[(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"\u53ef\u81ea\u884c\u8c03\u6574\u5217\u547d\u540d\u89c4\u5219\u3002"})}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,66}",children:'[SugarTable("JobDetail", "\u4f5c\u4e1a\u4fe1\u606f\u8868")]\r\npublic class JobDetail\r\n{\r\n /// <summary>\r\n /// Id\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "Id", IsPrimaryKey = true, IsIdentity = true)]\r\n public virtual long Id { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a Id\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u4f5c\u4e1aId")]\r\n public virtual string JobId { get; set; }\r\n\r\n /// <summary>\r\n /// \u7ec4\u540d\u79f0\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u7ec4\u540d\u79f0")]\r\n public string? GroupName { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a\u7c7b\u578b FullName\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u4f5c\u4e1a\u7c7b\u578b")]\r\n public string? JobType { get; set; }\r\n\r\n /// <summary>\r\n /// \u7a0b\u5e8f\u96c6 Name\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u7a0b\u5e8f\u96c6")]\r\n public string? AssemblyName { get; set; }\r\n\r\n /// <summary>\r\n /// \u63cf\u8ff0\u4fe1\u606f\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u63cf\u8ff0\u4fe1\u606f")]\r\n public string? Description { get; set; }\r\n\r\n /// <summary>\r\n /// \u662f\u5426\u5e76\u884c\u6267\u884c\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u662f\u5426\u5e76\u884c\u6267\u884c")]\r\n public bool Concurrent { get; set; } = true;\r\n\r\n /// <summary>\r\n /// \u662f\u5426\u626b\u63cf\u7279\u6027\u89e6\u53d1\u5668\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u662f\u5426\u626b\u63cf\u7279\u6027\u89e6\u53d1\u5668")]\r\n public bool IncludeAnnotations { get; set; } = false;\r\n\r\n /// <summary>\r\n /// \u989d\u5916\u6570\u636e\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u989d\u5916\u6570\u636e", ColumnDataType = "longtext,text,clob")]\r\n public string? Properties { get; set; } = "{}";\r\n\r\n /// <summary>\r\n /// \u66f4\u65b0\u65f6\u95f4\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u66f4\u65b0\u65f6\u95f4")]\r\n public DateTime? UpdatedTime { get; set; }\r\n}\r\n\r\n[SugarTable("JobTrigger", "\u4f5c\u4e1a\u89e6\u53d1\u5668\u8868")]\r\npublic class JobTrigger\r\n{\r\n /// <summary>\r\n /// Id\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "Id", IsPrimaryKey = true, IsIdentity = true)]\r\n public virtual long Id { get; set; }\r\n\r\n /// <summary>\r\n /// \u89e6\u53d1\u5668 Id\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u89e6\u53d1\u5668Id")]\r\n public virtual string TriggerId { get; set; }\r\n\r\n /// <summary>\r\n /// \u4f5c\u4e1a Id\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u4f5c\u4e1aId")]\r\n public virtual string JobId { get; set; }\r\n\r\n /// <summary>\r\n /// \u89e6\u53d1\u5668\u7c7b\u578b FullName\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u89e6\u53d1\u5668\u7c7b\u578b")]\r\n public string? TriggerType { get; set; }\r\n\r\n /// <summary>\r\n /// \u7a0b\u5e8f\u96c6 Name\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u7a0b\u5e8f\u96c6")]\r\n public string? AssemblyName { get; set; }\r\n\r\n /// <summary>\r\n /// \u53c2\u6570\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u53c2\u6570")]\r\n public string? Args { get; set; }\r\n\r\n /// <summary>\r\n /// \u63cf\u8ff0\u4fe1\u606f\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u63cf\u8ff0\u4fe1\u606f")]\r\n public string? Description { get; set; }\r\n\r\n /// <summary>\r\n /// \u72b6\u6001\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u72b6\u6001")]\r\n public TriggerStatus Status { get; set; } = TriggerStatus.Ready;\r\n\r\n /// <summary>\r\n /// \u8d77\u59cb\u65f6\u95f4\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u8d77\u59cb\u65f6\u95f4")]\r\n public DateTime? StartTime { get; set; }\r\n\r\n /// <summary>\r\n /// \u7ed3\u675f\u65f6\u95f4\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u7ed3\u675f\u65f6\u95f4")]\r\n public DateTime? EndTime { get; set; }\r\n\r\n /// <summary>\r\n /// \u6700\u8fd1\u8fd0\u884c\u65f6\u95f4\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u6700\u8fd1\u8fd0\u884c\u65f6\u95f4")]\r\n public DateTime? LastRunTime { get; set; }\r\n\r\n /// <summary>\r\n /// \u4e0b\u4e00\u6b21\u8fd0\u884c\u65f6\u95f4\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u4e0b\u4e00\u6b21\u8fd0\u884c\u65f6\u95f4")]\r\n public DateTime? NextRunTime { get; set; }\r\n\r\n /// <summary>\r\n /// \u89e6\u53d1\u6b21\u6570\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u89e6\u53d1\u6b21\u6570")]\r\n public long NumberOfRuns { get; set; }\r\n\r\n /// <summary>\r\n /// \u6700\u5927\u89e6\u53d1\u6b21\u6570\uff080:\u4e0d\u9650\u5236\uff0cn:N\u6b21\uff09\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u6700\u5927\u89e6\u53d1\u6b21\u6570")]\r\n public long MaxNumberOfRuns { get; set; }\r\n\r\n /// <summary>\r\n /// \u51fa\u9519\u6b21\u6570\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u51fa\u9519\u6b21\u6570")]\r\n public long NumberOfErrors { get; set; }\r\n\r\n /// <summary>\r\n /// \u6700\u5927\u51fa\u9519\u6b21\u6570\uff080:\u4e0d\u9650\u5236\uff0cn:N\u6b21\uff09\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u6700\u5927\u51fa\u9519\u6b21\u6570")]\r\n public long MaxNumberOfErrors { get; set; }\r\n\r\n /// <summary>\r\n /// \u91cd\u8bd5\u6b21\u6570\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u91cd\u8bd5\u6b21\u6570")]\r\n public int NumRetries { get; set; }\r\n\r\n /// <summary>\r\n /// \u91cd\u8bd5\u95f4\u9694\u65f6\u95f4\uff08ms\uff09\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u91cd\u8bd5\u95f4\u9694\u65f6\u95f4(ms)")]\r\n public int RetryTimeout { get; set; } = 1000;\r\n\r\n /// <summary>\r\n /// \u662f\u5426\u7acb\u5373\u542f\u52a8\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u662f\u5426\u7acb\u5373\u542f\u52a8")]\r\n public bool StartNow { get; set; } = true;\r\n\r\n /// <summary>\r\n /// \u662f\u5426\u542f\u52a8\u65f6\u6267\u884c\u4e00\u6b21\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u662f\u5426\u542f\u52a8\u65f6\u6267\u884c\u4e00\u6b21")]\r\n public bool RunOnStart { get; set; } = false;\r\n\r\n /// <summary>\r\n /// \u662f\u5426\u5728\u542f\u52a8\u65f6\u91cd\u7f6e\u6700\u5927\u89e6\u53d1\u6b21\u6570\u7b49\u4e8e\u4e00\u6b21\u7684\u4f5c\u4e1a\r\n /// </summary>\r\n /// <remarks>\u89e3\u51b3\u56e0\u6301\u4e45\u5316\u6570\u636e\u5df2\u5b8c\u6210\u4e00\u6b21\u89e6\u53d1\u4f46\u542f\u52a8\u65f6\u4e0d\u518d\u6267\u884c\u7684\u95ee\u9898</remarks>\r\n [SugarColumn(ColumnDescription = "\u662f\u5426\u5728\u542f\u52a8\u65f6\u91cd\u7f6e\u6700\u5927\u89e6\u53d1\u6b21\u6570\u7b49\u4e8e\u4e00\u6b21\u7684\u4f5c\u4e1a")]\r\n public bool ResetOnlyOnce { get; set; } = true;\r\n\r\n /// <summary>\r\n /// \u672c\u6b21\u6267\u884c\u7ed3\u679c\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u672c\u6b21\u6267\u884c\u7ed3\u679c")]\r\n public string? Result { get; set; }\r\n\r\n /// <summary>\r\n /// \u672c\u6b21\u6267\u884c\u8017\u65f6\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u672c\u6b21\u6267\u884c\u8017\u65f6")]\r\n public long ElapsedTime { get; set; }\r\n\r\n /// <summary>\r\n /// \u66f4\u65b0\u65f6\u95f4\r\n /// </summary>\r\n [SugarColumn(ColumnDescription = "\u66f4\u65b0\u65f6\u95f4")]\r\n public DateTime? UpdatedTime { get; set; }\r\n}\n'})})]})]}),"\n",(0,s.jsx)(r.h2,{id:"26113-\u4f5c\u4e1a\u96c6\u7fa4\u63a7\u5236",children:"26.1.13 \u4f5c\u4e1a\u96c6\u7fa4\u63a7\u5236"}),"\n",(0,s.jsx)(r.p,{children:"\u6846\u67b6\u63d0\u4f9b\u7b80\u5355\u7684\u96c6\u7fa4\u529f\u80fd\uff0c\u4f46\u5e76\u4e0d\u80fd\u8fbe\u5230\u8d1f\u8f7d\u5747\u8861\u7684\u6548\u679c\uff0c\u800c\u4ec5\u4ec5\u63d0\u4f9b\u4e86\u6545\u969c\u8f6c\u79fb\u7684\u529f\u80fd\uff0c\u5f53\u4e00\u4e2a\u670d\u52a1\u7684\u4f5c\u4e1a\u8c03\u5ea6\u5668\u5b95\u673a\u65f6\uff0c\u53e6\u4e00\u4e2a\u670d\u52a1\u7684\u4f5c\u4e1a\u8c03\u5ea6\u5668\u4f1a\u542f\u52a8\u3002"}),"\n",(0,s.jsx)(r.h3,{id:"261131-\u5b9e\u73b0\u96c6\u7fa4\u6545\u969c\u8f6c\u79fb",children:"26.1.13.1 \u5b9e\u73b0\u96c6\u7fa4\u6545\u969c\u8f6c\u79fb"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.strong,{children:["\u521b\u5efa ",(0,s.jsx)(r.code,{children:"JobClusterServer"})," \u7c7b\u5e76\u5b9e\u73b0 ",(0,s.jsx)(r.code,{children:"IJobClusterServer"})]})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,9,21-37,46,55,65}",children:'public class JobClusterServer : IJobClusterServer\r\n{\r\n /// <summary>\r\n /// \u5f53\u524d\u4f5c\u4e1a\u8c03\u5ea6\u5668\u542f\u52a8\u901a\u77e5\r\n /// </summary>\r\n /// <param name="context">\u4f5c\u4e1a\u96c6\u7fa4\u670d\u52a1\u4e0a\u4e0b\u6587</param>\r\n public void Start(JobClusterContext context)\r\n {\r\n // \u5728\u4f5c\u4e1a\u96c6\u7fa4\u8868\u4e2d\uff0c\u5982\u679c clusterId \u4e0d\u5b58\u5728\uff0c\u5219\u65b0\u589e\u4e00\u6761\uff08\u5426\u5219\u66f4\u65b0\u4e00\u6761\uff09\uff0c\u5e76\u8bbe\u7f6e status \u4e3a ClusterStatus.Waiting\r\n }\r\n\r\n /// <summary>\r\n /// \u7b49\u5f85\u88ab\u5524\u9192\r\n /// </summary>\r\n /// <param name="context">\u4f5c\u4e1a\u96c6\u7fa4\u670d\u52a1\u4e0a\u4e0b\u6587</param>\r\n /// <returns><see cref="Task"/></returns>\r\n public async Task WaitingForAsync(JobClusterContext context)\r\n {\r\n var clusterId = context.ClusterId;\r\n\r\n while (true)\r\n {\r\n try\r\n {\r\n // \u5728\u8fd9\u91cc\u67e5\u8be2\u6570\u636e\u5e93\uff0c\u6839\u636e\u4ee5\u4e0b\u4e24\u79cd\u60c5\u51b5\u5904\u7406\r\n // 1) \u5982\u679c\u4f5c\u4e1a\u96c6\u7fa4\u8868\u5df2\u6709 status \u4e3a ClusterStatus.Working \u5219\u7ee7\u7eed\u5faa\u73af\r\n // 2) \u5982\u679c\u4f5c\u4e1a\u96c6\u7fa4\u8868\u4e2d\u8fd8\u6ca1\u6709\u5176\u4ed6\u670d\u52a1\u6216\u53ea\u6709\u81ea\u5df1\uff0c\u5219\u63d2\u5165\u4e00\u6761\u96c6\u7fa4\u670d\u52a1\u6216\u8c03\u7528 await WorkNowAsync(clusterId); \u4e4b\u540e return;\r\n // 3) \u5982\u679c\u4f5c\u4e1a\u96c6\u7fa4\u8868\u4e2d\u6ca1\u6709 status \u4e3a ClusterStatus.Working \u7684\uff0c\u8c03\u7528 await WorkNowAsync(clusterId); \u4e4b\u540e return;\r\n\r\n await WorkNowAsync(clusterId);\r\n return;\r\n }\r\n catch { }\r\n\r\n // \u63a7\u5236\u96c6\u7fa4\u5fc3\u8df3\u9891\u7387\r\n await Task.Delay(3000);\r\n }\r\n }\r\n\r\n /// <summary>\r\n /// \u5f53\u524d\u4f5c\u4e1a\u8c03\u5ea6\u5668\u505c\u6b62\u901a\u77e5\r\n /// </summary>\r\n /// <param name="context">\u4f5c\u4e1a\u96c6\u7fa4\u670d\u52a1\u4e0a\u4e0b\u6587</param>\r\n public void Stop(JobClusterContext context)\r\n {\r\n // \u5728\u4f5c\u4e1a\u96c6\u7fa4\u8868\u4e2d\uff0c\u66f4\u65b0 clusterId \u7684 status \u4e3a ClusterStatus.Crashed\r\n }\r\n\r\n /// <summary>\r\n /// \u5f53\u524d\u4f5c\u4e1a\u8c03\u5ea6\u5668\u5b95\u673a\r\n /// </summary>\r\n /// <param name="context">\u4f5c\u4e1a\u96c6\u7fa4\u670d\u52a1\u4e0a\u4e0b\u6587</param>\r\n public void Crash(JobClusterContext context)\r\n {\r\n // \u5728\u4f5c\u4e1a\u96c6\u7fa4\u8868\u4e2d\uff0c\u66f4\u65b0 clusterId \u7684 status \u4e3a ClusterStatus.Crashed\r\n }\r\n\r\n /// <summary>\r\n /// \u6307\u793a\u96c6\u7fa4\u53ef\u4ee5\u5de5\u4f5c\r\n /// </summary>\r\n /// <param name="clusterId">\u96c6\u7fa4 Id</param>\r\n /// <returns></returns>\r\n private Task WorkNowAsync(string clusterId)\r\n {\r\n // \u5728\u4f5c\u4e1a\u96c6\u7fa4\u8868\u4e2d\uff0c\u66f4\u65b0 clusterId \u7684 status \u4e3a ClusterStatus.Working\r\n\r\n // \u6a21\u62df\u6570\u636e\u5e93\u66f4\u65b0\u64cd\u4f5c\uff08\u8017\u65f6\uff09\r\n await Task.Delay(3000);\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.strong,{children:"\u6ce8\u518c\u96c6\u7fa4\u670d\u52a1"})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3-4}",children:'services.AddSchedule(options =>\r\n{\r\n options.ClusterId = "cluster1";\r\n options.AddClusterServer<JobClusterServer>();\r\n});\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"3",children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.strong,{children:"\u4f5c\u4e1a\u96c6\u7fa4\u8f93\u51fa\u65e5\u5fd7"})}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers {4,6,8,16}",children:"info: 2022-12-05 18:26:11.4045753 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n Schedule hosted service is running.\r\ninfo: 2022-12-05 18:26:11.4126431 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #1\r\n The job cluster of <cluster1> service has been enabled, and waiting for instructions.\r\nwarn: 2022-12-05 18:26:14.4333100 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #6\r\n The job cluster of <cluster1> service worked now, and the current schedule hosted service will be preloading.\r\ninfo: 2022-12-05 18:26:14.4411758 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #6\r\n Schedule hosted service is preloading...\r\ninfo: 2022-12-05 18:26:14.4684974 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #6\r\n The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.\r\ninfo: 2022-12-05 18:26:14.4701128 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #6\r\n The scheduler of <job1> successfully appended to the schedule.\r\nwarn: 2022-12-05 18:26:14.4765709 +08:00 \u661f\u671f\u4e00 L System.Logging.ScheduleService[0] #6\r\n Schedule hosted service preload completed, and a total of <1> schedulers are appended.\r\ninfo: 2022-12-05 18:26:19.5089541 +08:00 \u661f\u671f\u4e00 L MyJob[0] #16\r\n <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 18:26:19.434 -> 2022-12-05 18:26:24.441\n"})}),"\n",(0,s.jsx)(r.h3,{id:"261132-\u4f5c\u4e1a\u96c6\u7fa4\u6570\u636e\u5e93\u8868\u8bbe\u8ba1",children:"26.1.13.2 \u4f5c\u4e1a\u96c6\u7fa4\u6570\u636e\u5e93\u8868\u8bbe\u8ba1"}),"\n",(0,s.jsxs)(r.p,{children:["\u53ea\u9700\u5305\u542b ",(0,s.jsx)(r.code,{children:"Id"}),"\uff0c",(0,s.jsx)(r.code,{children:"ClusterId"}),"\uff0c",(0,s.jsx)(r.code,{children:"Description"}),"\uff0c",(0,s.jsx)(r.code,{children:"Status"}),"\uff0c",(0,s.jsx)(r.code,{children:"UpdatedTime"})," \u5b57\u6bb5\u5373\u53ef\uff0c\u5176\u4e2d ",(0,s.jsx)(r.code,{children:"Status"})," \u662f ",(0,s.jsx)(r.code,{children:"ClusterStatus"})," \u679a\u4e3e\u7c7b\u578b\u3002"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.strong,{children:(0,s.jsx)(r.code,{children:"ClusterStatus"})})," \u5305\u542b\u4ee5\u4e0b\u679a\u4e3e\u6210\u5458","\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Crashed"}),"\uff1a\u5b95\u673a"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Working"}),"\uff1a\u6b63\u5e38\u5de5\u4f5c"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"Waiting"}),"\uff1a\u7b49\u5f85\u88ab\u5524\u9192\uff0c\u9ed8\u8ba4\u503c"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"261133-\u5982\u4f55\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861",children:"26.1.13.3 \u5982\u4f55\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861"}),"\n",(0,s.jsxs)(r.p,{children:["\u6846\u67b6\u53ea\u63d0\u4f9b\u4e86\u7b80\u5355\u7684\u6545\u969c\u8f6c\u79fb\u7684\u96c6\u7fa4\u529f\u80fd\uff0c\u5982\u9700\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861\uff0c\u53ef\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"TCP/IP"})," \u5957\u63a5\u5b57\u5b9e\u73b0\u3002"]}),"\n",(0,s.jsxs)(r.h2,{id:"26114-scheduleserve-\u9759\u6001\u7c7b",children:["26.1.14 ",(0,s.jsx)(r.code,{children:"ScheduleServe"})," \u9759\u6001\u7c7b"]}),"\n",(0,s.jsxs)(r.p,{children:["\u8be5\u529f\u80fd ",(0,s.jsx)(r.strong,{children:"\u5efa\u8bae"})," \u4ec5\u9650\u4e0d\u80fd\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"services.AddXXX"})," \u65b9\u5f0f\u4f7f\u7528\uff0c\u6bd4\u5982\u63a7\u5236\u53f0\uff0c",(0,s.jsx)(r.code,{children:"Winfrom/WPF"})," \u7b49\u3002"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3}",children:"IDisposable dispose = ScheduleServe.Run(options =>\r\n{\r\n options.AddJob<MyJob>(Triggers.Secondly());\r\n});\n"})}),"\n",(0,s.jsxs)(r.p,{children:["\u8fd9\u79cd\u65b9\u5f0f\u6709\u4e00\u4e2a\u9690\u85cf\u7684\u5de8\u5927\u9690\u85cf \u201c\u9a9a\u64cd\u4f5c\u201d\uff1a",(0,s.jsx)(r.strong,{children:"\u53ef\u4ee5\u5728\u4efb\u4f55\u5730\u65b9\u521b\u5efa\u4f5c\u4e1a\u8c03\u5ea6\u670d\u52a1\uff0c\u591a\u6b21\u8c03\u7528\u53ef\u4ee5\u521b\u5efa\u591a\u4e2a\u4f5c\u4e1a\u8c03\u5ea6\u5668\u3002"})]}),"\n",(0,s.jsxs)(r.admonition,{type:"tip",children:[(0,s.jsxs)(r.mdxAdmonitionTitle,{children:["\u63a8\u8350\u4f7f\u7528 ",(0,s.jsx)(r.code,{children:"Serve.Run()"})," \u6216 ",(0,s.jsx)(r.code,{children:"Serve.RunGeneric()"})," \u65b9\u5f0f\u66ff\u4ee3"]}),(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"Furion"})," \u6846\u67b6\u63d0\u4f9b\u4e86 ",(0,s.jsx)(r.code,{children:"Serve.Run()"})," \u65b9\u5f0f\u652f\u6301\u8de8\u5e73\u53f0\u4f7f\u7528\uff0c\u8fd8\u80fd\u652f\u6301\u6ce8\u518c\u66f4\u591a\u670d\u52a1\uff0c\u5982\uff1a"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3,5}",children:"Serve.Run(services =>\r\n{\r\n services.AddSchedule(options =>\r\n {\r\n options.Add<MyJob>(Triggers.Secondly());\r\n });\r\n})\n"})}),(0,s.jsxs)(r.p,{children:["\u5982\u65e0\u9700 ",(0,s.jsx)(r.code,{children:"Web"})," \u529f\u80fd\uff0c\u53ef\u901a\u8fc7 ",(0,s.jsx)(r.code,{children:"Serve.RunGeneric"})," \u66ff\u4ee3 ",(0,s.jsx)(r.code,{children:"Serve.Run"}),"\u3002"]})]}),"\n",(0,s.jsx)(r.h2,{id:"26115-\u5982\u4f55\u90e8\u7f72",children:"26.1.15 \u5982\u4f55\u90e8\u7f72"}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u679c\u5728\u9879\u76ee\u4e2d\u4f7f\u7528\u4e86\u5b9a\u65f6\u4efb\u52a1\u4e14\u90e8\u7f72\u5230 ",(0,s.jsx)(r.code,{children:"IIS"})," \u4e2d\uff0c\u90a3\u4e48\u9700\u8981\u8bbe\u7f6e ",(0,s.jsx)(r.code,{children:"IIS"})," \u7981\u6b62\u56de\u6536\uff0c",(0,s.jsxs)(r.a,{href:"/docs/deploy-iis#3415-iis-%E5%9B%9E%E6%94%B6%E9%97%AE%E9%A2%98%E5%92%8C%E9%85%8D%E7%BD%AE",children:["\u70b9\u51fb\u67e5\u770b ",(0,s.jsx)(r.code,{children:"IIS"})," \u56de\u6536\u95ee\u9898\u89e3\u51b3\u65b9\u6848"]})]}),"\n",(0,s.jsx)(r.admonition,{title:"\u90e8\u7f72\u5efa\u8bae",type:"warning",children:(0,s.jsxs)(r.p,{children:["\u5efa\u8bae\u5b9a\u65f6\u4efb\u52a1\u91c7\u7528 ",(0,s.jsx)(r.code,{children:"Worker Service"})," \u72ec\u7acb\u90e8\u7f72\u65b9\u5f0f\uff0c\u4e0d\u5e94\u4f9d\u6258 ",(0,s.jsx)(r.code,{children:"Web"})," \u9879\u76ee\u8fdb\u7a0b\u4e2d\u3002",(0,s.jsx)(r.a,{href:"/docs/process-service",children:"\u67e5\u770b\u3010 Worker Service\u3011\u7ae0\u8282"})]})}),"\n",(0,s.jsxs)(r.h3,{id:"261151-worker-service-\u4ee3\u7801\u96c6\u6210\u4f8b\u5b50",children:["26.1.15.1 ",(0,s.jsx)(r.code,{children:"Worker Service"})," \u4ee3\u7801\u96c6\u6210\u4f8b\u5b50"]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsxs)(r.strong,{children:["1. \u5b89\u88c5 ",(0,s.jsx)(r.code,{children:"Furion"})," \u6216 ",(0,s.jsx)(r.code,{children:"Sundial"})," \u5305"]})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",metastring:"showLineNumbers",children:"# \u5b8c\u6574\u7684\u5f00\u53d1\u6846\u67b6\r\ndotnet add package Furion;\r\n\r\n# \u53ea\u9700\u8981\u5b9a\u65f6\u4efb\u52a1\u670d\u52a1\u529f\u80fd\r\ndotnet add package Sundial\n"})}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsxs)(r.strong,{children:["2. \u6ce8\u518c ",(0,s.jsx)(r.code,{children:"Schedule"})," \u670d\u52a1"]})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {3-4,19-22}",children:"using Microsoft.Extensions.DependencyInjection;\r\nusing Microsoft.Extensions.Hosting;\r\nusing Furion.Schedule;\r\n// using Sundial;\r\n\r\nnamespace FurionWorkers;\r\n\r\npublic class Program\r\n{\r\n public static void Main(string[] args)\r\n {\r\n CreateHostBuilder(args).Build().Run();\r\n }\r\n\r\n public static IHostBuilder CreateHostBuilder(string[] args) =>\r\n Host.CreateDefaultBuilder(args)\r\n .ConfigureServices((hostContext, services) =>\r\n {\r\n services.AddSchedule(options =>\r\n {\r\n options.AddJob<MyJob>(Triggers.PeriodSeconds(5));\r\n });\r\n });\r\n}\n"})}),"\n",(0,s.jsxs)(r.admonition,{title:"\u5c0f\u77e5\u8bc6",type:"tip",children:[(0,s.jsxs)(r.p,{children:["\u5982\u679c\u4f7f\u7528 ",(0,s.jsx)(r.code,{children:"Serve"})," \u6a21\u5f0f\uff0c\u90a3\u4e48\u4ee3\u7801\u5c06\u975e\u5e38\u7cbe\u7b80\uff0c\u65e0\u9700\u4e0a\u9762\u7b2c\u4e8c\u4e2a\u6b65\u9aa4\u7684\u4ee3\u7801~\uff0c\u5982\uff1a"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,3-6}",children:"Serve.RunGeneric(services =>\r\n{\r\n services.AddSchedule(options =>\r\n {\r\n options.AddJob<MyJob>(Triggers.PeriodSeconds(5));\r\n });\r\n})\n"})})]}),"\n",(0,s.jsxs)(r.h2,{id:"26116-dashboard-\u770b\u677f\u529f\u80fd",children:["26.1.16 ",(0,s.jsx)(r.code,{children:"Dashboard"})," \u770b\u677f\u529f\u80fd"]}),"\n",(0,s.jsx)(r.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(r.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(r.code,{children:"Furion 4.8.4 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(r.p,{children:["\u5728 ",(0,s.jsx)(r.code,{children:"Furion 4.8.4+"})," \u7248\u672c\u5185\u7f6e\u4e86\u4e00\u4e2a\u5d4c\u5165\u7684\u5b9a\u65f6\u4efb\u52a1\u770b\u677f ",(0,s.jsx)(r.code,{children:"UI"}),"\uff0c\u53ea\u9700\u8981\u5728 ",(0,s.jsx)(r.code,{children:"Startup.cs"})," \u4e2d\u542f\u7528\u5373\u53ef\uff0c\u5982\uff1a"]}),"\n",(0,s.jsxs)(r.admonition,{type:"tip",children:[(0,s.jsxs)(r.mdxAdmonitionTitle,{children:["\u5728 ",(0,s.jsx)(r.code,{children:"Sundial"})," \u4e2d\u4f7f\u7528"]}),(0,s.jsxs)(r.p,{children:["\u5982\u679c\u4f7f\u7528\u7684\u662f ",(0,s.jsx)(r.code,{children:"Sundial"})," \u72ec\u7acb\u5f00\u6e90\u9879\u76ee\uff0c\u53ea\u9700\u8981\u5b89\u88c5 ",(0,s.jsx)(r.code,{children:"Sundial.Dashboard"})," \u5305\u5373\u53ef\uff0c\u65e0\u9700\u5b89\u88c5 ",(0,s.jsx)(r.code,{children:"Sundial"}),"\uff0c\u524d\u8005\u5df2\u6dfb\u52a0\u4e86\u540e\u8005\u7684\u5f15\u7528\u3002"]})]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {2,5}",children:'app.UseStaticFiles();\r\napp.UseScheduleUI();\r\n\r\n// \u8fd8\u53ef\u4ee5\u914d\u7f6e\u751f\u4ea7\u73af\u5883\u5173\u95ed\r\napp.UseScheduleUI(options =>\r\n{\r\n options.RequestPath = "/custom-job"; // Furion 4.8.5.6+ \u7248\u672c\u652f\u6301\uff0c\u5fc5\u987b\u4ee5 / \u5f00\u5934\u4e14\u4e0d\u4ee5 / \u7ed3\u5c3e\r\n options.DisableOnProduction = true;\r\n options.SyncRate = 300; // \u63a7\u5236\u770b\u677f\u5237\u65b0\u9891\u7387\uff0c\u9ed8\u8ba4 300ms\uff0cFurion 4.8.7.43+ \u652f\u6301\uff0c`Furion 4.8.8.29+` \u5df2\u79fb\u9664\r\n});\n'})}),"\n",(0,s.jsx)(r.admonition,{title:"\u4e2d\u95f4\u4ef6\u8bf4\u660e",type:"caution",children:(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"app.UseScheduleUI()"})," \u5fc5\u987b\u5728 ",(0,s.jsx)(r.code,{children:"app.UseStaticFiles()"})," \u4e4b\u540e\u6ce8\u518c\u3002"]})}),"\n",(0,s.jsxs)(r.h3,{id:"261161-\u5728-worker-service-\u4e2d\u6ce8\u518c",children:["26.1.16.1 \u5728 ",(0,s.jsx)(r.code,{children:"Worker Service"})," \u4e2d\u6ce8\u518c"]}),"\n",(0,s.jsxs)(r.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",(0,s.jsx)(r.code,{children:"Worker Service"})," \u4e0d\u63d0\u4f9b ",(0,s.jsx)(r.code,{children:"Web"})," \u529f\u80fd\uff0c\u90a3\u4e48\u81ea\u7136\u800c\u7136\u4e0d\u80fd\u63d0\u4f9b ",(0,s.jsx)(r.code,{children:"Web"})," \u770b\u677f\u529f\u80fd\uff0c\u5982\u679c\u60f3\u4f7f\u5176\u652f\u6301\uff0c\u53ef\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\uff1a"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\u6dfb\u52a0\u65e5\u5fd7\u914d\u7f6e\uff08",(0,s.jsx)(r.code,{children:"appsettings.json"})," \u548c ",(0,s.jsx)(r.code,{children:"appsettings.Development.json"}),"\uff09"]}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",metastring:"showLineNumbers {6-7}",children:'{\r\n "Logging": {\r\n "LogLevel": {\r\n "Default": "Information",\r\n "Microsoft.Hosting.Lifetime": "Information",\r\n "Microsoft.AspNetCore": "Warning",\r\n "System.Net.Http.HttpClient": "Warning"\r\n }\r\n }\r\n}\n'})}),"\n",(0,s.jsxs)(r.ol,{start:"2",children:["\n",(0,s.jsx)(r.li,{children:"\u6ce8\u518c\u4e2d\u95f4\u4ef6\u670d\u52a1"}),"\n"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {8,11-15}",children:"using Microsoft.AspNetCore.Builder;\r\nusing Microsoft.AspNetCore.Hosting;\r\nusing WorkerService1;\r\n\r\nIHost host = Host.CreateDefaultBuilder(args)\r\n .ConfigureServices(services =>\r\n {\r\n services.AddSchedule();\r\n services.AddHostedService<Worker>();\r\n })\r\n .ConfigureWebHostDefaults(builder => builder.Configure(app =>\r\n {\r\n app.UseStaticFiles();\r\n app.UseScheduleUI();\r\n }))\r\n .Build();\r\n\r\nhost.Run();\n"})}),"\n",(0,s.jsx)(r.h3,{id:"261162-\u770b\u677f\u914d\u7f6e\u9009\u9879",children:"26.1.16.2 \u770b\u677f\u914d\u7f6e\u9009\u9879"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"app.UseScheduleUI"})," \u63d0\u4f9b\u4e86\u53ef\u9009\u7684 ",(0,s.jsx)(r.code,{children:"ScheduleUIOptions"})," \u914d\u7f6e\u9009\u9879\uff0c\u63d0\u4f9b\u4ee5\u4e0b\u914d\u7f6e\uff1a"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"RequestPath"}),"\uff1a\u914d\u7f6e\u770b\u677f\u5165\u53e3\u5730\u5740\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,s.jsx)(r.code,{children:"/schedule"}),"\uff0c\u9700\u4ee5 ",(0,s.jsx)(r.code,{children:"/"})," \u5f00\u5934\uff0c\u7ed3\u5c3e\u4e0d\u5305\u542b ",(0,s.jsx)(r.code,{children:"/"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"DisableOnProduction"}),"\uff1a\u662f\u5426\u5728\u751f\u4ea7\u73af\u5883\u5173\u95ed\uff0c",(0,s.jsx)(r.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,s.jsx)(r.code,{children:"false"})]}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.del,{children:[(0,s.jsx)(r.code,{children:"SyncRate"}),"\uff1a\u63a7\u5236\u770b\u677f\u5237\u65b0\u9891\u7387\uff0c",(0,s.jsx)(r.code,{children:"int"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,s.jsx)(r.code,{children:"300"}),"\uff0c\u5355\u4f4d ",(0,s.jsx)(r.code,{children:"\u6beb\u79d2"}),"\uff0c",(0,s.jsx)(r.code,{children:"Furion 4.8.7.43+"})," \u652f\u6301\uff0c",(0,s.jsxs)(r.strong,{children:[(0,s.jsx)(r.code,{children:"Furion 4.8.8.29+"})," \u5df2\u79fb\u9664"]})]})}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"VisualPath"}),"\uff1a\u4e8c\u7ea7\u865a\u62df\u76ee\u5f55\u8def\u5f84\uff0c",(0,s.jsx)(r.code,{children:"string"})," \u7c7b\u578b\uff0c\u9700\u4ee5 ",(0,s.jsx)(r.code,{children:"/"})," \u5f00\u5934\uff0c\u7ed3\u5c3e\u4e0d\u5305\u542b ",(0,s.jsx)(r.code,{children:"/"})," \uff0c",(0,s.jsx)(r.code,{children:"Furion 4.8.8.20+"})," \u652f\u6301"]}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["\u63a5\u7740\u6253\u5f00\u6d4f\u89c8\u5668\u5e76\u8bbf\u95ee ",(0,s.jsx)(r.code,{children:"/schedule"})," \u5730\u5740\u5373\u53ef\uff1a"]}),"\n",(0,s.jsx)("img",{src:(0,c.Z)("img/job_dash.png")}),"\n",(0,s.jsxs)(r.p,{children:["\u524d\u7aef\u6e90\u7801\u5730\u5740\uff1a",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/tree/v4/clients/schedule-dashboard",children:"https://gitee.com/dotnetchina/Furion/tree/v4/clients/schedule-dashboard"})]}),"\n",(0,s.jsx)(r.h2,{id:"26117-\u5e38\u89c1\u95ee\u9898",children:"26.1.17 \u5e38\u89c1\u95ee\u9898"}),"\n",(0,s.jsx)(r.h3,{id:"261171-\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u4e2d\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u5b58\u5728\u504f\u5dee",children:"26.1.17.1 \u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u4e2d\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u5b58\u5728\u504f\u5dee"}),"\n",(0,s.jsxs)(r.p,{children:["\u901a\u5e38\u6211\u4eec\u4f1a\u5728 ",(0,s.jsx)(r.code,{children:"IJob"})," \u5b9e\u73b0\u7c7b\u578b\u4e2d\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\uff0c\u4f46\u662f\u8fd9\u4e2a\u65f6\u95f4\u53ef\u80fd\u5b58\u5728\u7740\u6781\u5c0f\u7684\u8bef\u5dee\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {5,8}",children:"public class MyJob : IJob\r\n{\r\n public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)\r\n {\r\n var nowTime = DateTime.Now; // \u6b64\u65f6\u7684\u65f6\u95f4\u672a\u5fc5\u662f\u771f\u5b9e\u89e6\u53d1\u65f6\u95f4\uff0c\u56e0\u4e3a\u8fd8\u5305\u542b\u521b\u5efa\u7ebf\u7a0b\uff0c\u521d\u59cb\u5316\u7b49\u7b49\u65f6\u95f4\r\n\r\n // \u6b63\u786e\u7684\u505a\u6cd5\u662f\r\n var nowTime = context.OccurrenceTime;\r\n }\r\n}\n"})}),"\n",(0,s.jsx)(r.h3,{id:"261172-\u4f5c\u4e1a\u89e6\u53d1\u5668\u53c2\u6570\u5e8f\u5217\u5316\u53cd\u5e8f\u5217\u5316",children:"26.1.17.2 \u4f5c\u4e1a\u89e6\u53d1\u5668\u53c2\u6570\u5e8f\u5217\u5316/\u53cd\u5e8f\u5217\u5316"}),"\n",(0,s.jsxs)(r.p,{children:["\u6846\u67b6\u63d0\u4f9b\u4e86 ",(0,s.jsx)(r.code,{children:"Schedular"})," \u9759\u6001\u7c7b\u65b9\u6cd5\uff1a",(0,s.jsx)(r.code,{children:"Serialize/Deserialize"})," \u53ef\u5bf9\u4f5c\u4e1a\u89e6\u53d1\u5668\u53c2\u6570 ",(0,s.jsx)(r.code,{children:"object[]"})," \u7c7b\u578b\u8fdb\u884c\u5e8f\u5217\u5316\u548c\u53cd\u5e8f\u5217\u5316\u64cd\u4f5c\uff0c\u901a\u5e38\u5728\u5f00\u53d1\u5b9a\u65f6\u4efb\u52a1\u7ba1\u7406\u540e\u53f0\u65f6\u975e\u5e38\u6709\u7528\u3002\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,5}",children:'// \u5e8f\u5217\u5316\uff0c\u65b9\u4fbf\u7ec4\u5408 `UI` \u4e0d\u540c\u8f93\u5165\u6846\u4f5c\u4e1a\u89e6\u53d1\u5668\u53c2\u6570\r\nvar args = new object[] { "* * * * * *", CronStringFormat.WithSeconds };\r\nvar stringArgs = Schedular.Serialize(args);\r\n\r\n// \u53cd\u5e8f\u5217\u5316\uff0c\u65b9\u4fbf\u62c6\u5f00\u4f5c\u4e1a\u89e6\u53d1\u5668\u53c2\u6570\u5728 `UI` \u4e0d\u540c\u5217\u5c55\u793a\r\nvar stringArgs = "[\\"* * * * *\\",0]";\r\nvar args = Schedular.Deserialize<object[]>(stringArgs);\n'})}),"\n",(0,s.jsx)(r.h3,{id:"261173-\u4f5c\u4e1a\u4fe1\u606f\u989d\u5916\u6570\u636e\u5e8f\u5217\u5316\u53cd\u5e8f\u5217\u5316",children:"26.1.17.3 \u4f5c\u4e1a\u4fe1\u606f\u989d\u5916\u6570\u636e\u5e8f\u5217\u5316/\u53cd\u5e8f\u5217\u5316"}),"\n",(0,s.jsxs)(r.p,{children:["\u6846\u67b6\u63d0\u4f9b\u4e86 ",(0,s.jsx)(r.code,{children:"Schedular"})," \u9759\u6001\u7c7b\u65b9\u6cd5\uff1a",(0,s.jsx)(r.code,{children:"Serialize/Deserialize"})," \u53ef\u5bf9\u4f5c\u4e1a\u4fe1\u606f\u989d\u5916\u662f\u6570\u636e ",(0,s.jsx)(r.code,{children:"Dictionary<string, object>"})," \u7c7b\u578b\u8fdb\u884c\u5e8f\u5217\u5316\u548c\u53cd\u5e8f\u5217\u5316\u64cd\u4f5c\uff0c\u901a\u5e38\u5728\u5f00\u53d1\u5b9a\u65f6\u4efb\u52a1\u7ba1\u7406\u540e\u53f0\u65f6\u975e\u5e38\u6709\u7528\u3002\u5982\uff1a"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-cs",metastring:"showLineNumbers {1,5}",children:'// \u5e8f\u5217\u5316\uff0c\u65b9\u4fbf\u7ec4\u5408 `UI` \u4e0d\u540c\u8f93\u5165\u6846\u4f5c\u4e1a\u4fe1\u606f\u989d\u5916\u6570\u636e\r\nvar jobData = new Dictionary<string, object> { { "name", "Furion" } };\r\nvar stringJobData = Schedular.Serialize(jobData);\r\n\r\n// \u53cd\u5e8f\u5217\u5316\uff0c\u65b9\u4fbf\u62c6\u5f00\u4f5c\u4e1a\u4f5c\u4e1a\u4fe1\u606f\u989d\u5916\u6570\u636e\u5728 `UI` \u4e0d\u540c\u5217\u5c55\u793a\r\nvar stringJobData = "{\\"name\\":\\"Furion\\"}";\r\nvar args = Schedular.Deserialize<Dictionary<string, object>>(stringJobData);\n'})}),"\n",(0,s.jsx)(r.h3,{id:"261174-\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u5ef6\u8fdf\u5904\u7406",children:"26.1.17.4 \u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u5ef6\u8fdf\u5904\u7406"}),"\n",(0,s.jsxs)(r.p,{children:["\u5728\u4f5c\u4e1a\u5904\u7406\u7a0b\u5e8f\u4e2d\u5982\u9700\u4f7f\u7528\u5230\u5ef6\u8fdf\u7ebf\u7a0b\u64cd\u4f5c\uff0c\u63a8\u8350\u4f7f\u7528 ",(0,s.jsx)(r.code,{children:"Task.Delay"})," \u800c\u4e0d\u662f ",(0,s.jsx)(r.code,{children:"Thread.Sleep"}),"\uff0c\u539f\u56e0\u662f\u540e\u8005\u662f\u540c\u6b65\u5ef6\u8fdf\u4f1a\u963b\u585e\u7ebf\u7a0b\uff0c\u800c\u4e14\u4e0d\u80fd\u53d6\u6d88\u3002"]}),"\n",(0,s.jsx)(r.h3,{id:"261175-\u5b9a\u65f6\u4efb\u52a1\u90e8\u7f72\u8bf4\u660e",children:"26.1.17.5 \u5b9a\u65f6\u4efb\u52a1\u90e8\u7f72\u8bf4\u660e"}),"\n",(0,s.jsx)(r.p,{children:"\u90e8\u7f72\u5b9a\u65f6\u4efb\u52a1\u8bf7\u786e\u4fdd\u670d\u52a1\u5668\uff08\u64cd\u4f5c\u7cfb\u7edf\uff09\u4e0d\u4f1a\u8fdb\u5165\u4f11\u7720\u4e14\u957f\u65f6\u95f4\u8fd0\u884c\u3002"}),"\n",(0,s.jsxs)(r.p,{children:["\u5982\u679c\u5728\u9879\u76ee\u4e2d\u4f7f\u7528\u4e86\u5b9a\u65f6\u4efb\u52a1\u4e14\u90e8\u7f72\u5230 ",(0,s.jsx)(r.code,{children:"IIS"})," \u4e2d\uff0c\u90a3\u4e48\u9700\u8981\u8bbe\u7f6e ",(0,s.jsx)(r.code,{children:"IIS"})," \u7981\u6b62\u56de\u6536\uff0c\u907f\u514d\u4e8b\u4ef6\u603b\u7ebf\u670d\u52a1\u8fdb\u5165\u4f11\u7720\uff0c",(0,s.jsxs)(r.a,{href:"./deploy-iis#3415-iis-%E5%9B%9E%E6%94%B6%E9%97%AE%E9%A2%98%E5%92%8C%E9%85%8D%E7%BD%AE",children:["\u70b9\u51fb\u67e5\u770b ",(0,s.jsx)(r.code,{children:"IIS"})," \u56de\u6536\u95ee\u9898\u89e3\u51b3\u65b9\u6848"]}),"\u3002"]}),"\n",(0,s.jsx)(r.h2,{id:"26118-\u53cd\u9988\u4e0e\u5efa\u8bae",children:"26.1.18 \u53cd\u9988\u4e0e\u5efa\u8bae"}),"\n",(0,s.jsx)(r.admonition,{title:"\u4e0e\u6211\u4eec\u4ea4\u6d41",type:"note",children:(0,s.jsxs)(r.p,{children:["\u7ed9 Furion \u63d0 ",(0,s.jsx)(r.a,{href:"https://gitee.com/dotnetchina/Furion/issues/new?issue",children:"Issue"}),"\u3002"]})})]})}function x(e={}){const{wrapper:r}={...(0,i.a)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(j,{...e})}):j(e)}},5162:(e,r,n)=>{n.d(r,{Z:()=>c});n(7294);var s=n(4334);const i={tabItem:"tabItem_Ymn6"};var o=n(5893);function c(e){let{children:r,hidden:n,className:c}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.Z)(i.tabItem,c),hidden:n,children:r})}},4866:(e,r,n)=>{n.d(r,{Z:()=>v});var s=n(7294),i=n(4334),o=n(2466),c=n(6550),d=n(469),l=n(1980),t=n(7392),a=n(12);function u(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:r}=e;return!!r&&"object"==typeof r&&"value"in r}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:r,children:n}=e;return(0,s.useMemo)((()=>{const e=r??function(e){return u(e).map((e=>{let{props:{value:r,label:n,attributes:s,default:i}}=e;return{value:r,label:n,attributes:s,default:i}}))}(n);return function(e){const r=(0,t.l)(e,((e,r)=>e.value===r.value));if(r.length>0)throw new Error(`Docusaurus error: Duplicate values "${r.map((e=>e.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[r,n])}function g(e){let{value:r,tabValues:n}=e;return n.some((e=>e.value===r))}function j(e){let{queryString:r=!1,groupId:n}=e;const i=(0,c.k6)(),o=function(e){let{queryString:r=!1,groupId:n}=e;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!n)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:r,groupId:n});return[(0,l._X)(o),(0,s.useCallback)((e=>{if(!o)return;const r=new URLSearchParams(i.location.search);r.set(o,e),i.replace({...i.location,search:r.toString()})}),[o,i])]}function x(e){const{defaultValue:r,queryString:n=!1,groupId:i}=e,o=h(e),[c,l]=(0,s.useState)((()=>function(e){let{defaultValue:r,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(r){if(!g({value:r,tabValues:n}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${r}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return r}const s=n.find((e=>e.default))??n[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:r,tabValues:o}))),[t,u]=j({queryString:n,groupId:i}),[x,p]=function(e){let{groupId:r}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(r),[i,o]=(0,a.Nk)(n);return[i,(0,s.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:i}),b=(()=>{const e=t??x;return g({value:e,tabValues:o})?e:null})();(0,d.Z)((()=>{b&&l(b)}),[b]);return{selectedValue:c,selectValue:(0,s.useCallback)((e=>{if(!g({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),p(e)}),[u,p,o]),tabValues:o}}var p=n(2389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=n(5893);function y(e){let{className:r,block:n,selectedValue:s,selectValue:c,tabValues:d}=e;const l=[],{blockElementScrollPositionUntilNextRender:t}=(0,o.o5)(),a=e=>{const r=e.currentTarget,n=l.indexOf(r),i=d[n].value;i!==s&&(t(r),c(i))},u=e=>{let r=null;switch(e.key){case"Enter":a(e);break;case"ArrowRight":{const n=l.indexOf(e.currentTarget)+1;r=l[n]??l[0];break}case"ArrowLeft":{const n=l.indexOf(e.currentTarget)-1;r=l[n]??l[l.length-1];break}}r?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},r),children:d.map((e=>{let{value:r,label:n,attributes:o}=e;return(0,m.jsx)("li",{role:"tab",tabIndex:s===r?0:-1,"aria-selected":s===r,ref:e=>l.push(e),onKeyDown:u,onClick:a,...o,className:(0,i.Z)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":s===r}),children:n??r},r)}))})}function S(e){let{lazy:r,children:n,selectedValue:i}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(r){const e=o.find((e=>e.props.value===i));return e?(0,s.cloneElement)(e,{className:"margin-top--md"}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:o.map(((e,r)=>(0,s.cloneElement)(e,{key:r,hidden:e.props.value!==i})))})}function T(e){const r=x(e);return(0,m.jsxs)("div",{className:(0,i.Z)("tabs-container",b.tabList),children:[(0,m.jsx)(y,{...e,...r}),(0,m.jsx)(S,{...e,...r})]})}function v(e){const r=(0,p.Z)();return(0,m.jsx)(T,{...e,children:u(e.children)},String(r))}},510:(e,r,n)=>{n.d(r,{Z:()=>G});n(7294);const s=(e,r,n)=>e?"string"==typeof e?e:e[r]||n:n;var i=n(5893);const o={display:"block"},c=e=>{let{size:r,color:n,style:c,...d}=e;const l=c?{...o,...c}:o;return(0,i.jsx)("svg",{viewBox:"0 0 1024 1024",width:r+"px",height:r+"px",style:l,...d,children:(0,i.jsx)("path",{d:"M856.4 292.8c-63.3-63.6-126.6-127.1-190.2-190.3-15.3-15.2-32.7-16.1-48.1-0.8-64.3 63.6-128.1 127.6-191.8 191.9-14 14.2-16.3 31.6-1.7 46 14.8 14.7 31.5 10.6 46.1-2.7 5.1-4.6 9.8-9.7 14.7-14.7 39.2-39.7 78.5-79.5 122.8-124.4 0 170 3 332.2-1.1 494-2.4 96.4-91.2 174.6-187.4 176.6-110.6 2.3-198.6-84.4-199-197.4-0.6-136.3-0.2-272.6-0.1-408.9 0-21.8-7.9-37.4-31.2-39.9-18.9-2-33.2 13.2-33.1 37.5 0 145.8-3.4 291.7 2.4 437.2 6 152.1 160.4 263.5 309.5 230.5C591.8 900 672.8 797.2 673.6 664.6c0.8-144 0.2-288.1 0.2-432.1v-33.3c11.2 10.2 17.6 15.4 23.3 21.3 38.5 38.4 76.7 77 115.3 115.2 14.8 14.6 32.2 19.2 47.8 2.9 13.8-14.8 10.3-31.7-3.8-45.8z",fill:s(n,0,"#333333")})})};c.defaultProps={size:18};const d=c,l={display:"block"},t=e=>{let{size:r,color:n,style:o,...c}=e;const d=o?{...l,...o}:l;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:r+"px",height:r+"px",style:d,...c,children:[(0,i.jsx)("path",{d:"M143.872 768a51.2 51.2 0 0 1-15.36-2.56 51.2 51.2 0 0 1-35.328-51.2V283.136a148.992 148.992 0 0 1 141.824-153.6h450.56a148.992 148.992 0 0 1 141.824 153.6V512a148.992 148.992 0 0 1-141.824 153.6H244.224l-60.928 80.896a51.2 51.2 0 0 1-39.424 21.504zM235.008 180.224a97.792 97.792 0 0 0-90.624 102.4v430.592L218.624 614.4h466.944a97.792 97.792 0 0 0 90.624-102.4V283.136a97.792 97.792 0 0 0-90.624-102.4z",fill:s(n,0,"#333333")}),(0,i.jsx)("path",{d:"M880.128 875.52a51.2 51.2 0 0 1-39.424-20.48l-60.928-80.896h-243.2a25.6 25.6 0 0 1 0-51.2h268.8l76.288 102.4v-295.936a25.6 25.6 0 0 1 25.6-25.6 25.6 25.6 0 0 1 25.6 25.6v293.888a51.2 51.2 0 0 1-51.2 51.2z",fill:s(n,1,"#333333")})]})};t.defaultProps={size:18};const a=t,u={display:"block"},h=e=>{let{size:r,color:n,style:o,...c}=e;const d=o?{...u,...o}:u;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:r+"px",height:r+"px",style:d,...c,children:[(0,i.jsx)("path",{d:"M223.425605 449.2744l161.632237 0 0 253.65714c0 16.954137 13.745049 30.699186 30.699186 30.699186 16.95516 0 30.699186-13.745049 30.699186-30.699186l0-284.356326c0-16.95516-13.744026-30.699186-30.699186-30.699186L291.035446 387.876028l217.23665-248.51605L733.039255 387.580293 607.104031 387.580293c-16.954137 0-30.699186 13.745049-30.699186 30.699186l0 284.652062c0 16.954137 13.745049 30.699186 30.699186 30.699186s30.699186-13.745049 30.699186-30.699186L637.803217 448.978664l164.448376 0c12.140505 0 23.140023-7.154957 28.063149-18.251689 4.922103-11.097756 2.841721-24.053835-5.307889-33.05279L530.62315 72.570829c-5.881964-6.495948-14.273075-10.134825-23.024389-10.091846-8.763594 0.076748-17.076934 3.895727-22.844288 10.494005L200.312188 398.371056c-7.92653 9.067516-9.818623 21.931498-4.839215 32.896224S211.383338 449.2744 223.425605 449.2744z",fill:s(n,0,"#333333")}),(0,i.jsx)("path",{d:"M222.354204 829.113381l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186s-13.745049-30.699186-30.699186-30.699186L222.354204 767.715009c-16.954137 0-30.699186 13.745049-30.699186 30.699186S205.400067 829.113381 222.354204 829.113381z",fill:s(n,1,"#333333")}),(0,i.jsx)("path",{d:"M804.086381 896.729361 222.354204 896.729361c-16.954137 0-30.699186 13.745049-30.699186 30.699186s13.745049 30.699186 30.699186 30.699186l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186S821.041542 896.729361 804.086381 896.729361z",fill:s(n,2,"#333333")})]})};h.defaultProps={size:18};const g=h,j={display:"block"},x=e=>{let{size:r,color:n,style:o,...c}=e;const d=o?{...j,...o}:j;return(0,i.jsx)("svg",{viewBox:"0 0 1024 1024",width:r+"px",height:r+"px",style:d,...c,children:(0,i.jsx)("path",{d:"M380.15463648 874.54223633c0 18.12744166-14.83154297 32.95898463-32.95898463 32.95898463s-32.95898463-14.83154297-32.95898462-32.95898463V228.9152832L172.71078883 370.86962865a33.04467773 33.04467773 0 0 1-46.60400416 0 33.04467773 33.04467773 0 0 1 0-46.6040034l197.55615234-198.14941406A32.76782227 32.76782227 0 0 1 347.0967749 116.52514674c0.03295924 0 0.06591772-0.03295924 0.09887695-0.03295924 1.54907201 0 2.90039088 0.69213867 4.41650366 0.88989258 2.66967773 0.39550781 5.40527318 0.59326172 7.94311548 1.61499049 12.03002904 4.94384766 20.59936549 16.71020508 20.59936549 30.45410156v725.0910642z m320.15698192 23.34155248a32.85351537 32.85351537 0 0 1-23.43383789 9.59106445c-0.03295924 0-0.06591772 0.03295924-0.09887696 0.03295924-1.54907201 0-2.90039088-0.69213867-4.41650365-0.92285182-2.70263697-0.36254857-5.40527318-0.56030248-7.94311549-1.61498972-12.03002904-4.91088842-20.59936549-16.67724584-20.59936473-30.42114309V149.45776367c0-18.12744166 14.83154297-32.95898463 32.95898387-32.95898463s32.95898463 14.83154297 32.95898463 32.95898463v645.60058619l141.52587916-141.92138697c12.81445313-12.82104467 33.81591797-12.82104467 46.63037109 0 12.78808619 12.81445313 12.78808619 33.77636719 0 46.60400416L700.3116184 897.88378881z",fill:s(n,0,"#333333")})})};x.defaultProps={size:18};const p=x,b={display:"block"},m=e=>{let{size:r,color:n,style:o,...c}=e;const d=o?{...b,...o}:b;return(0,i.jsx)("svg",{viewBox:"0 0 1172 1024",width:r+"px",height:r+"px",style:d,...c,children:(0,i.jsx)("path",{d:"M870.0416 250.4704a38.4 38.4 0 0 0-8.96 53.5552c13.056 18.2784 24.4224 37.8368 33.7408 58.112a38.4512 38.4512 0 0 0 50.944 18.8928 38.4512 38.4512 0 0 0 18.8416-50.944 436.0192 436.0192 0 0 0-40.96-70.6048 38.3488 38.3488 0 0 0-53.6064-9.0112zM181.4528 566.016a35.9936 35.9936 0 0 0 25.5488-10.5984L351.7952 410.624a36.096 36.096 0 1 0-51.0976-51.0976L217.6 442.5728C250.0096 278.1184 395.264 153.6 569.1392 153.6c50.7904 0 99.8912 10.3936 145.92 30.9248a38.4 38.4 0 1 0 31.232-70.0928 431.36 431.36 0 0 0-177.152-37.632c-214.6816 0-393.1136 156.416-428.4416 361.216L62.1568 359.4752a36.1984 36.1984 0 0 0-51.0976 51.0976l144.8448 144.7936a36.0448 36.0448 0 0 0 25.5488 10.6496zM978.5344 463.104a36.1984 36.1984 0 0 0-51.0976 0l-144.8448 144.7936a36.096 36.096 0 1 0 51.0976 51.0976l88.6272-88.576C894.3104 740.2496 746.8032 870.4 569.1392 870.4a357.7856 357.7856 0 0 1-325.2736-207.7184 38.4 38.4 0 1 0-69.7344 32.3072 434.3808 434.3808 0 0 0 394.9568 252.2112c215.1936 0 393.984-157.184 428.6464-362.7008l74.496 74.496a35.9936 35.9936 0 0 0 51.0976 0 36.096 36.096 0 0 0 0-51.0976l-144.7936-144.7936z",fill:s(n,0,"#333333")})})};m.defaultProps={size:18};const y=m,S={display:"block"},T=e=>{let{size:r,color:n,style:o,...c}=e;const d=o?{...S,...o}:S;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:r+"px",height:r+"px",style:d,...c,children:[(0,i.jsx)("path",{d:"M302 332a30 30 0 1 1 0-60h420a30 30 0 0 1 0 60H302zM302 542a30 30 0 0 1 0-60h420a30 30 0 0 1 0 60H302zM302 752a30 30 0 0 1 0-60h120a30 30 0 0 1 0 60H302z",fill:s(n,0,"#333333")}),(0,i.jsx)("path",{d:"M789.47 784.1a30 30 0 0 1 39.36 45.3l-144.24 125.25a30 30 0 0 1-19.68 7.35H214.85C163.4 962 122 919.46 122 867.38V156.62C122 104.54 163.4 62 214.85 62h594.3C860.6 62 902 104.54 902 156.62v529.05a30 30 0 1 1-60 0V156.62C842 137.3 827.09 122 809.15 122H214.85C196.91 122 182 137.3 182 156.62v710.76C182 886.7 196.91 902 214.85 902h438.84l135.78-117.9z",fill:s(n,1,"#333333")}),(0,i.jsx)("path",{d:"M692 931.19a30 30 0 1 1-60 0v-174.6C632 704.57 673.4 662 724.85 662h147.78a30 30 0 0 1 0 60h-147.78c-17.94 0-32.85 15.3-32.85 34.62v174.6z",fill:s(n,2,"#333333")})]})};T.defaultProps={size:18};const v=T,L={display:"block"},N=e=>{let{size:r,color:n,style:o,...c}=e;const d=o?{...L,...o}:L;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:r+"px",height:r+"px",style:d,...c,children:[(0,i.jsx)("path",{d:"M512 883.2A371.2 371.2 0 1 0 140.8 512 371.2 371.2 0 0 0 512 883.2z m0 64a435.2 435.2 0 1 1 435.2-435.2 435.2 435.2 0 0 1-435.2 435.2z",fill:s(n,0,"#333333")}),(0,i.jsx)("path",{d:"M557.056 512l122.368 122.368a31.744 31.744 0 1 1-45.056 45.056L512 557.056l-122.368 122.368a31.744 31.744 0 1 1-45.056-45.056L466.944 512 344.576 389.632a31.744 31.744 0 1 1 45.056-45.056L512 466.944l122.368-122.368a31.744 31.744 0 1 1 45.056 45.056z",fill:s(n,1,"#333333")})]})};N.defaultProps={size:18};const f=N,C={display:"block"},J=e=>{let{size:r,color:n,style:o,...c}=e;const d=o?{...C,...o}:C;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:r+"px",height:r+"px",style:d,...c,children:[(0,i.jsx)("path",{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 34.8-28.2 63-63 63H232c-34.8 0-63-28.2-63-63 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5 0.2 13 0.7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7 6 17.2 13.6 33.6 22.7 49 24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2c41.5-24.3 76.2-59 100.5-100.5 9.1-15.5 16.7-31.9 22.7-49C812.1 793.1 836 831.8 836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7 0.4-6.4 0.7-12.8 0.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3-20.1 11.8-42 20-64.9 24.3V484c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v396.5c-22.9-4.3-44.8-12.5-64.9-24.3-30.3-17.7-55.6-43-73.3-73.3C317.7 752 308 716.8 308 680V412h408v268z",fill:s(n,0,"#333333")}),(0,i.jsx)("path",{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1-17.2-31.5-42.5-56.8-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9-31.5 17.2-56.8 42.5-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z",fill:s(n,1,"#333333")})]})};J.defaultProps={size:18};const A=J,I={display:"block"},B=e=>{let{size:r,color:n,style:o,...c}=e;const d=o?{...I,...o}:I;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:r+"px",height:r+"px",style:d,...c,children:[(0,i.jsx)("path",{d:"M512 71.68c-242.688 0-440.32 197.632-440.32 440.32s197.632 440.32 440.32 440.32 440.32-197.632 440.32-440.32-197.632-440.32-440.32-440.32z m0 819.2c-208.896 0-378.88-169.984-378.88-378.88s169.984-378.88 378.88-378.88 378.88 169.984 378.88 378.88-169.984 378.88-378.88 378.88z",fill:s(n,0,"#333333")}),(0,i.jsx)("path",{d:"M542.72 261.12H481.28v220.16H261.12v61.44h220.16v220.16h61.44v-220.16h220.16V481.28h-220.16z",fill:s(n,1,"#333333")})]})};B.defaultProps={size:18};const E=B,_={display:"block"},F=e=>{let{size:r,color:n,style:o,...c}=e;const d=o?{..._,...o}:_;return(0,i.jsx)("svg",{viewBox:"0 0 1024 1024",width:r+"px",height:r+"px",style:d,...c,children:(0,i.jsx)("path",{d:"M384 896h-64v-70.4c0-15.2-10.4-28-24.8-31.2C159.2 768 64 644.8 64 496v-32h64v32c0 118.4 73.6 215.2 179.2 236 44.8 8.8 76.8 48 76.8 94.4v69.6zM704 896h-64v-70.4c0-45.6 32-85.6 76.8-94.4C822.4 711.2 896 614.4 896 496v-32h64v32c0 148.8-95.2 272-231.2 298.4-14.4 3.2-24.8 16-24.8 31.2v70.4zM512.8 640l-41.6-37.6c-147.2-133.6-244-208-244-316.8 0-88 68.8-156.8 156.8-156.8 49.6 0 97.6 23.2 128.8 60C544 152 592 128.8 641.6 128.8c88 0 156.8 68.8 156.8 156.8 0 108-96.8 183.2-244 316.8L512.8 640z",fill:s(n,0,"#333333")})})};F.defaultProps={size:18};const R=F,M={display:"block"},w=e=>{let{size:r,color:n,style:o,...c}=e;const d=o?{...M,...o}:M;return(0,i.jsx)("svg",{viewBox:"0 0 1024 1024",width:r+"px",height:r+"px",style:d,...c,children:(0,i.jsx)("path",{d:"M942.4615936 284.62787926c-14.30911886-14.12709945-37.31996786-14.05468217-51.48229632 0.21920654L517.97142983 661.27810333 139.75544149 286.45003606c-14.30911886-14.16232846-37.31996786-14.05468217-51.51948344 0.21920654-14.16232846 14.30911886-14.05468217 37.35519687 0.21920654 51.51948345l401.99014627 398.34974663c0.61847666 0.61847666 1.41897273 0.76526706 2.03940637 1.34655658 0.14483342 0.14483342 0.18201941 0.32685283 0.32685283 0.47364324 7.09877874 7.02636259 16.38375538 10.55911595 25.63154489 10.55911595 9.35739278 0 18.75001458-3.60516949 25.85075143-10.77636551l398.34974663-401.99014628C956.84312974 321.8382427 956.73548345 298.7921647 942.4615936 284.62787926z",fill:s(n,0,"#333333")})})};w.defaultProps={size:18};const k=w,D={display:"block"},O=e=>{let{size:r,color:n,style:o,...c}=e;const d=o?{...D,...o}:D;return(0,i.jsx)("svg",{viewBox:"0 0 1024 1024",width:r+"px",height:r+"px",style:d,...c,children:(0,i.jsx)("path",{d:"M81.5384064 739.37212074c14.30911886 14.12709945 37.31996786 14.05468217 51.48229632-0.21920654L506.02857017 362.72189667 884.24455851 737.54996394c14.30911886 14.16232846 37.31996786 14.05468217 51.51948344-0.21920654 14.16232846-14.30911886 14.05468217-37.35519687-0.21920654-51.51948345l-401.99014627-398.34974663c-0.61847666-0.61847666-1.41897273-0.76526706-2.03940637-1.34655658-0.14483342-0.14483342-0.18201941-0.32685283-0.32685282-0.47364324-7.09877874-7.02636259-16.38375538-10.55911595-25.6315449-10.55911595-9.35739278 0-18.75001458 3.60516949-25.85075143 10.77636551l-398.34974663 401.99014628C67.15687026 702.1617573 67.26451655 725.2078353 81.5384064 739.37212074z",fill:s(n,0,"#333333")})})};O.defaultProps={size:18};const P=O,U=e=>{let{name:r,...n}=e;switch(r){case"youhua":return(0,i.jsx)(d,{...n});case"dayi":return(0,i.jsx)(a,{...n});case"shengji":return(0,i.jsx)(g,{...n});case"tiaozheng":return(0,i.jsx)(p,{...n});case"gengxin":return(0,i.jsx)(y,{...n});case"wendang":return(0,i.jsx)(v,{...n});case"shanchu":return(0,i.jsx)(f,{...n});case"bug":return(0,i.jsx)(A,{...n});case"xinzeng":return(0,i.jsx)(E,{...n});case"fuwu":return(0,i.jsx)(R,{...n});case"down":return(0,i.jsx)(k,{...n});case"up":return(0,i.jsx)(P,{...n})}return null},H={label:"label_p8vM",icon:"icon_knQK"};function G(e){const{children:r}=e,n={"\u65b0\u589e":{icon:"xinzeng",bgColor:"#39b54a"},"\u4fee\u590d":{icon:"bug",bgColor:"#9c26b0"},"\u6587\u6863":{icon:"wendang",bgColor:"rgb(79, 147, 255)"},"\u66f4\u65b0":{icon:"gengxin",bgColor:"#0081ff"},"\u8c03\u6574":{icon:"tiaozheng",bgColor:"#333"},"\u5347\u7ea7":{icon:"shengji",bgColor:"#e03997"},"\u79fb\u9664":{icon:"shanchu",bgColor:"#666"},"\u7b54\u7591":{icon:"dayi",bgColor:"#bbb"},"\u4f18\u5316":{icon:"youhua",bgColor:"#38e550"}};return(0,i.jsxs)("label",{className:H.label,title:r,style:{backgroundColor:n[r].bgColor},children:[(0,i.jsx)(U,{name:n[r].icon,color:"white",size:14,className:H.icon})," ",r]})}},1151:(e,r,n)=>{n.d(r,{Z:()=>d,a:()=>c});var s=n(7294);const i={},o=s.createContext(i);function c(e){const r=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function d(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),s.createElement(o.Provider,{value:r},e.children)}}}]);