1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using Quartz;
- using SMP.Tool.TimingTask.Jobs;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace SMP.Tool.TimingTask.Core
- {
- public static class JobConfig
- {
- #region 服务地址
- private static string smpService = "http://localhost:7123/";
- #endregion
- #region 接口
- public static string QueryWaitReadJobApi => $"{smpService}FinanceTask/QueryWaitRead";
- public static string ExecuteTaskJobApi => $"{smpService}FinanceTask/ExecuteTaskJob";
- public static string CreateApi => $"{smpService}FinanceTask/Create";
- #endregion
- public static IJobDetail[] jobs
- {
- get
- {
- return new IJobDetail[]
- {
- JobBuilder.Create<QueryWaitReadJob>().Build(),
- JobBuilder.Create<CreatFinanceTaskJob>().Build(),
- };
- }
- }
- public static string[] crons
- {
- get
- {
- return new string[]
- {
- //"0 0/1 * * * ?",//每1分钟执行,测试用
- "0 0/5 * * * ?",//每5分钟执行一次
- "0 0 0 */1 * ?",//每天零点执行
- //"0 0 9 * * ?",//每天9点执行
- };
- }
- }
- }
- }
|