Пример #1
0
        /// <summary>
        /// 创建任务&服务承载信息
        /// </summary>
        /// <param name="jobId">任务编号</param>
        /// <param name="serverId">服务编号</param>
        /// <returns></returns>
        public static JobServerHost CreateJobServerHost(string jobId, string serverId)
        {
            var jobServerHost = new JobServerHost();

            jobServerHost.SetJob(Job.CreateJob(jobId));
            jobServerHost.SetServer(ServerNode.CreateServerNode(serverId));
            return(jobServerHost);
        }
Пример #2
0
 /// <summary>
 /// 创建一个服务节点执行计划对象
 /// </summary>
 /// <param name="trigger">编号</param>
 /// <returns></returns>
 public static TriggerServer CreateTriggerServer(string triggerId, string serverId, TaskTriggerServerRunStatus runState = TaskTriggerServerRunStatus.运行)
 {
     return(CreateTriggerServer(Trigger.CreateTrigger(triggerId), ServerNode.CreateServerNode(serverId), runState));
 }