public IJob CreateInstance(JobEntity entity)
        {
            string fullAssemblyName = "";

            if (entity.AssemblyName != "")
            {
                fullAssemblyName = this.AppDir + "\\" + entity.AssemblyName;
            }
            IJob job = JobFactory.CreateJobInstance(fullAssemblyName, entity.ClassName);

            if (job == null)
            {
                throw new InvalidOperationException("未能创建任务" + entity.Code + "对象");
            }
            job.JobCode = entity.Code;

            return(job);
        }