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 <<<"); }
public Job(string name, Action run) { JobDispatch.Insert(name, run); }