Beispiel #1
0
        public async Task <bool> AddAsync(JobTasksEntity entity)
        {
            var sql = $@"INSERT INTO JobTasks
(Id,NodeName,Title,Remark,CronExpression,AssemblyName,ClassName,CustomParamsJson,Status,CreateTime,CreateUserId,CreateUserName,TotalRunCount,Children)
VALUES
(@Id,@NodeName,@Title,@Remark,@CronExpression,@AssemblyName,@ClassName,@CustomParamsJson,@Status,@CreateTime,@CreateUserId,@CreateUserName,0,@Children)";

            return((await _context.ExecuteAsync(sql, entity)) > 0);
        }
Beispiel #2
0
        private async Task LoadPluginFile(QuartzDao _quartzDao, JobTasksEntity model)
        {
            var master = await _quartzDao.QueryJobNodeByTypeAsync("master");

            if (master == null)
            {
                throw new InvalidOperationException("cannot find master.");
            }
            //var sourcePath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "tasks", model.AssemblyName);
        }
Beispiel #3
0
 public Task <int> UpdateJobTaskAsync(JobTasksEntity entity)
 {
     return(_context.ExecuteAsync("UPDATE JobTasks SET LastRunTime=@LastRunTime,NextRunTime=@NextRunTime,TotalRunCount=@TotalRunCount,Status=@Status WHERE Id=@Id", entity));
 }
Beispiel #4
0
 public async Task <bool> UpdateJobTaskAsync(JobTasksEntity entity)
 {
     return((await _context.ExecuteAsync("UPDATE JobTasks SET AssemblyName=@AssemblyName, ClassName=@ClassName,CronExpression=@CronExpression,CustomParamsJson=@CustomParamsJson,Remark=@Remark,Title=@Title,Children=@Children  WHERE Id=@Id", entity)) > 0);
 }