public TaskCommonModel RunTask(string token, string name = "ScanJavJob") { TaskCommonModel ret = new TaskCommonModel(); var to = ScanDataBaseManager.GetToken().Token; if (to == token) { TaskService ts = new TaskService(); var task = ts.FindTask(name); ret.Message = "程序没有执行"; if (task != null && task.State == TaskState.Ready) { task.Run(); ret.Message = "开始执行"; } } else { ret.Message = "没有权限"; } return(ret); }
public TaskCommonModel SiriRunJob(string token, string jobName = "SiriRun", int page = 15) { TaskCommonModel ret = new TaskCommonModel(); var to = ScanDataBaseManager.GetToken().Token; if (to == token) { var parameter = new ScanParameter(); parameter.IsAsc = true; parameter.PageSize = page; parameter.StartingPage = new List <string>() { "http://www.javlibrary.com/cn/vl_update.php?mode=" }; var jobId = ScanDataBaseManager.InsertScanJob(jobName, JsonConvert.SerializeObject(parameter)); ret.Message = "建立成功"; } else { ret.Message = "没有权限"; } return(ret); }