增加定时任务

This commit is contained in:
liming 蔡
2026-07-21 19:37:29 +08:00
parent 127da277e0
commit af014ed33c
8 changed files with 182 additions and 20 deletions
+29
View File
@@ -0,0 +1,29 @@
using JY.Model;
using JY.Model.Common;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
namespace JY.Inspection
{
public partial class HomeForm
{
#region 定时任务
TaskScheduler scheduler = null;
private void InitTaskScheduler()
{
if (scheduler == null)
{
scheduler = new TaskScheduler();
}
scheduler.AddTask(state => {
Debug.WriteLine("Hello");
}, interval: 1000 * 60);
}
#endregion
}
}