qinchulong
2025-03-29 039a4a5433e7f80adc88b491b549e5d9486e4f9a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.CutomerModel;
using WIDESEA_Core.Utilities;
 
namespace WIDESEA_WCS
{
    /// <summary>
    /// 服务调度接口
    /// </summary>
    public interface ISchedulerCenterServer:IDisposable
    {
        /// <summary>
        /// 开启任务调度
        /// </summary>
        /// <returns></returns>
        Task<WebResponseContent> StartScheduleAsync();
 
        /// <summary>
        /// 停止任务调度
        /// </summary>
        /// <returns></returns>
        Task<WebResponseContent> StopScheduleAsync();
 
        /// <summary>
        /// 添加一个任务
        /// </summary>
        /// <param name="sysSchedule"></param>
        /// <returns></returns>
        Task<WebResponseContent> AddScheduleJobAsync(JobOptions job);
 
        /// <summary>
        /// 停止一个任务
        /// </summary>
        /// <param name="sysSchedule"></param>
        /// <returns></returns>
        Task<WebResponseContent> StopScheduleJobAsync(JobOptions job);
 
        /// <summary>
        /// 检测任务是否存在
        /// </summary>
        /// <param name="sysSchedule"></param>
        /// <returns></returns>
        Task<bool> IsExistScheduleJobAsync(JobOptions job);
 
        /// <summary>
        /// 暂停指定的计划任务
        /// </summary>
        /// <param name="sysSchedule"></param>
        /// <returns></returns>
        Task<WebResponseContent> PauseJob(JobOptions job);
 
        /// <summary>
        /// 恢复一个任务
        /// </summary>
        /// <param name="sysSchedule"></param>
        /// <returns></returns>
        Task<WebResponseContent> ResumeJob(JobOptions job);
 
        /// <summary>
        /// 获取任务触发器状态
        /// </summary>
        /// <param name="sysSchedule"></param>
        /// <returns></returns>
        Task<List<TaskInfoDto>> GetTaskStaus(JobOptions job);
        /// <summary>
        /// 获取触发器标识
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        string GetTriggerState(string key);
 
        /// <summary>
        /// 立即执行 一个任务
        /// </summary>
        /// <param name="job"></param>
        /// <returns></returns>
        Task<WebResponseContent> ExecuteJobAsync(JobOptions job);
    }
}