예제 #1
0
        public void Execute(IJobExecutionContext context)
        {
            string name = context.JobDetail.Key.Name;

            log.Info(name + ":Execute begin >>>");
            var action = JobDispatch.JobForKey(context.JobDetail.Key.Name);

            if (action != null)
            {
                action();
            }
            log.Info(name + ":Execute end   <<<");
        }
예제 #2
0
 public Job(string name, Action run)
 {
     JobDispatch.Insert(name, run);
 }